Re: Question about laterDate: and earlierDate:
Re: Question about laterDate: and earlierDate:
- Subject: Re: Question about laterDate: and earlierDate:
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 16 Oct 2007 13:56:30 -0600
On Oct 16, 2007, at 7:59 AM, Paul Bruneau wrote:
I heard in Big Nerd Ranch's Cocoa Boot Camp last July that people
were turning away from NSCalendarDate due to localization concerns
IIRC. Is there some documentation from Apple that can fully explain
to me why I shouldn't use NSCalendarDate? I have no such
localization concerns in my case but am still interested.
Having worked with both:
NSCalendarDate is tied to the Gregorian calendar. Its calendar
component methods are very fast (NSCalendar's methods are much
slower, especially on PPC Macs for some reason), but it doesn't
support the Julian calendar (which was used prior to October 1582),
and doesn't properly support BC dates.
NSCalendar properly supports the Gregorian and Julian calendars, plus
a number of other world calendars. It also supports multiple eras,
which is particularly important to the Japanese calendar. Its only
real problem is it's slow, and it has some interesting bugs as of OS
X 10.4.10.
Right now there are only two reasons why NSCalendarDate is still
around: Backward compatibility, and the fact that NSCalendarDate can
encapsulate time zones (NSDate can't, and NSCalendar assumes all
dates are in the same time zone). If you don't care about those two
things, and you don't mind its slowness, than NSCalendar is probably
for you.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden