• 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: NSCalendar bug with adding to pre-1919 dates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendar bug with adding to pre-1919 dates?


  • Subject: Re: NSCalendar bug with adding to pre-1919 dates?
  • From: Ben Kazez <email@hidden>
  • Date: Wed, 1 Mar 2006 21:45:04 -0600

On Mar 1, 2006, at 4:08 PM, John Stiles wrote:

On Mar 1, 2006, at 1:33 PM, Brett Powley wrote:


Whether it's confusing or not, exactly one year after March 1, 1918 0:00 /is/ March 1, 1919 1:00. I don't think it's up for debate :)

I'm actually not persuaded by this. The one hour time difference ought to appear if your starting date was before DST and your ending date during DST. However, surely one year later DST has finished so the time has gone *back* an hour again?


Unless there is some weirdness about 1918/1919.


Either way, I take back my original statement... according to a web page I just found, it appears that DST in 1919 started on April 6 and ended on Oct.26. It seems like a March date should be unaffected by DST either way.



I really don't know enough about calendars to know whether or not this is an NSCalendar or NSDate bug. But perhaps it's just a documentation bug -- I assumed this method first changed the components of the date (in this case just simply adding one to the year) and then made any necessary corrections to avoid invalid dates (such as converting a result of January 32 to February 1). I'll file a documentation enhancement request, and solve the problem by extracting the date components, changing them, and then creating a new date from the changed components.


Thanks for the help, everyone!

Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: NSCalendar bug with adding to pre-1919 dates? (From: Greg Herlihy <email@hidden>)
 >Re: NSCalendar bug with adding to pre-1919 dates? (From: Ben Kazez <email@hidden>)
 >Re: NSCalendar bug with adding to pre-1919 dates? (From: John Stiles <email@hidden>)
 >Re: NSCalendar bug with adding to pre-1919 dates? (From: Brett Powley <email@hidden>)
 >Re: NSCalendar bug with adding to pre-1919 dates? (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Commenting style
  • Next by Date: Re: vCard -> loss of Identity
  • Previous by thread: Re: NSCalendar bug with adding to pre-1919 dates?
  • Next by thread: Re: why would I get <true></true> in coredata metadata plist?
  • Index(es):
    • Date
    • Thread