• 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: NSCalendarDate has subsecond precision
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSCalendarDate has subsecond precision


  • Subject: Re: NSCalendarDate has subsecond precision
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 15 Aug 2008 14:51:31 -0700

On Aug 15, 2008, at 14:28, Jim Thomason wrote:

First of all, the origin of this. I had a little method that returns
"today at midnight". Basically, I just created an NSCalendarDate
object with [NSCalendarDate date] and subtracted off the current
hours, minutes, and seconds to yield today with time values of
00:00:00. That worked just fine, and for today (for example), I got a
nice value back of: 2008-08-15 00:00:00 -0500.

Incidentally, this was never the right strategy, even if NSCalendarDate dealt in whole seconds. It would give you the wrong answer (for example) on any day when daylight savings time changed.



_______________________________________________

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: 
 >NSCalendarDate has subsecond precision (From: "Jim Thomason" <email@hidden>)

  • Prev by Date: Expanding outline view item ancestry
  • Next by Date: Re: Forcing an NSImage to render it's NSImageRep's ?
  • Previous by thread: Re: NSCalendarDate has subsecond precision
  • Next by thread: Expanding outline view item ancestry
  • Index(es):
    • Date
    • Thread