[phobos] datetime review

Yao G. yao.gomez at gmail.com
Tue Oct 12 12:37:36 PDT 2010


On Tue, 12 Oct 2010 14:19:51 -0500, Michel Fortin  
<michel.fortin at michelf.com> wrote:

> For a date system that does support multiple calendars very well, take  
> look at the Cocoa dates. Cocoa has NSDate which is basically a  
> timestamp, NSDateComponents which contains a list of components for  
> calendar dates and time of day, and the NSCalendar class that converts  
> between the two.

Another good library that's calendar-agnostic is the Joda Time. It has  
several chronologies (calendars), like ISO8601, buddhist, coptic,  
ethiopic, gregorian, islamic, etc., that can be plugged dynamically. It's  
a very comprehensive library.

http://joda-time.sourceforge.net/

However. I don't think is that useful to have support for multiple  
calendars. I mean it's a cool thing to have, but honestly, how many  
programmers actually use Julian or Coptic calendars? It's a very niche  
usage of date and time programming constructs.

-- 
Yao G.


More information about the phobos mailing list