• 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: Trouble comparing NSCalendarDates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble comparing NSCalendarDates


  • Subject: Re: Trouble comparing NSCalendarDates
  • From: j o a r <email@hidden>
  • Date: Mon, 15 Nov 2004 11:30:05 +0100


On 2004-11-15, at 11.14, Tito Ciuro wrote:

If I call this:
returnedValue = [NSCalendarDate dateWithString: [NSString stringWithUTF8String: data]];
The proper date is returned... *however*: if you compare both dates, they're still *not* the same. It seems to me that the original date created using [NSCalendarDate date] stores sub-
second information. This extra info is not stored to disk, so when we instantiate a new NSCalendarDate object with the above statement, the sub-second information has been lost:

If you check the string that you pass to NSCalendarDate, does it contain the subsecond data that you're interested in?


If it does, perhaps you could retain the sub-second precision if you use a format string that explicitly includes sub-second precision?

Is there any way I can store/retrieve to disk all the information belonging to an NSCalendarDate?

How about using these methods from NSDate? You could probably use them both for comparing and storing values.


+[NSDate dateWithTimeIntervalSinceReferenceDate:]
-[NSDate timeIntervalSinceReferenceDate]

j o a r

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Trouble comparing NSCalendarDates
      • From: Tito Ciuro <email@hidden>
References: 
 >Trouble comparing NSCalendarDates (From: Tito Ciuro <email@hidden>)
 >Re: Trouble comparing NSCalendarDates (From: j o a r <email@hidden>)
 >Re: Trouble comparing NSCalendarDates (From: Tito Ciuro <email@hidden>)
 >Re: Trouble comparing NSCalendarDates (From: j o a r <email@hidden>)
 >Re: Trouble comparing NSCalendarDates (From: Tito Ciuro <email@hidden>)
 >Re: Trouble comparing NSCalendarDates (From: Tito Ciuro <email@hidden>)

  • Prev by Date: NSImage & colorspace
  • Next by Date: Fast Screen update
  • Previous by thread: Re: Trouble comparing NSCalendarDates
  • Next by thread: Re: Trouble comparing NSCalendarDates
  • Index(es):
    • Date
    • Thread