
Message du 16/04/11 15:11 De : "Artyom" A : boost@lists.boost.org Copie à : Objet : Re: [boost] [locale] Review. Internationalization library?
I guess this has already been discussed, so if it is the case, please could you give me the pointer?
Instead of providing new datetime, calendars classes I would preferred that you propose the needed modification to Boost.DateTime library, so it can be used in an internationalization context.
Why have you preferred to redo Boost.DateTime?
Few pointers:
- http://cppcms.sourceforge.net/boost_locale/html/appendix.html#why_plain_numb... - http://cppcms.sourceforge.net/boost_locale/html/dates_times_timezones.html#d...
Few points to differ:
Boot.Locale date_time is:
a) Provides different calendars (non-Gregorian) like Hebrew, Islamic that are frequently used using same interface.
b) locale dependent (which calendar, what is first day of week)
c) Time-Zone dependent (for example adding one hour is different from changing its posix time by +3600 because of Summer time)
d) Represents both time and date in same object represented as a POSIX time
Note: ptime is different as it is not really POSIX time it may be local time as well.
Basically Boost.DateTime and Boost.Locale's date_time have very few in common.
The domain, isn't it?
Boost.Locale's date_time is like a calculator of time in current locale.
Do your classes preserve the same interface than Boost.DateTime?
No, it does not. It is very different.
So, you have needed to change the interface completly. Have you take a look at Boost.Chrono? I'm sure that it will inspire to find a more open interface. Best, vicente