• 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: Representing dates B.C. with NSCalendarDate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Representing dates B.C. with NSCalendarDate


  • Subject: Re: Representing dates B.C. with NSCalendarDate
  • From: Finlay Dobbie <email@hidden>
  • Date: Fri, 27 Sep 2002 15:28:57 +0100

On Thursday, September 26, 2002, at 03:45 am, John Blackburn wrote:

The docs say the year as represented in NSCalendarDate is relative to "the base year of the Common Era...(which is the same as 1 A.D.)." But they don't say how to represent years before that date.

NSCalendarDate's date parsing code appears to have problems with negative years in the %Y field, but you can always use:

NSCalendarDate *date = [NSCalendarDate dateWithYear:-414 month:1 day:1 hour:0 minute:0 second:0 timeZone:[NSTimeZone systemTimeZone]];

-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Representing dates B.C. with NSCalendarDate (From: John Blackburn <email@hidden>)

  • Prev by Date: NSClassDescription?
  • Next by Date: Brain Fade with NSView layout
  • Previous by thread: Representing dates B.C. with NSCalendarDate
  • Next by thread: NSString and control character
  • Index(es):
    • Date
    • Thread