• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Question about laterDate: and earlierDate:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Question about laterDate: and earlierDate: (From: Paul Bruneau <email@hidden>)
 >Re: Question about laterDate: and earlierDate: (From: Mike Abdullah <email@hidden>)
 >Re: Question about laterDate: and earlierDate: (From: Paul Bruneau <email@hidden>)

  • Prev by Date: Re: Question about laterDate: and earlierDate:
  • Next by Date: Re: JIS2004 compliance for free with custom UI?
  • Previous by thread: Re: Question about laterDate: and earlierDate:
  • Next by thread: Re: Question about laterDate: and earlierDate:
  • Index(es):
    • Date
    • Thread