Re: Trouble comparing NSCalendarDates
Re: Trouble comparing NSCalendarDates
- Subject: Re: Trouble comparing NSCalendarDates
- From: Tito Ciuro <email@hidden>
- Date: Mon, 15 Nov 2004 10:17:19 +0100
On Nov 15, 2004, at 09:40, j o a r wrote:
On 2004-11-15, at 09.27, Tito Ciuro wrote:
2) Later, when I need to retrieve it from disk, I call returnedValue = [[[NSCalendarDate alloc] dateWithCalendarFormat:dateData] timeZone:nil]autorelease];
No, that's not right - what do you *really* call?
The data is retrieved from a SQLite database and is a 'const char*'. So I call:
returnedValue = [[[NSCalendarDate alloc] dateWithCalendarFormat:[NSString stringWithUTF8String:data] timeZone:nil]autorelease];
What do you mean with "that's not right"? Why not?
Can you show the code that generates this log line?
NSCalendarDate* testDataDate = [NSCalendarDate calendarDate];
NSCalendarDate* verifyDate = <method which returns the value as shown above>...
NSTimeInterval interval = [testDataDate timeIntervalSinceDate:verifyDate];
NSLog(@"interval between the two: %f", interval);
Thanks,
-- Tito
_______________________________________________
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