NSTimeInterval
NSTimeInterval
- Subject: NSTimeInterval
- From: Maxwell Robertson <email@hidden>
- Date: Mon, 29 Aug 2005 22:29:36 +0100
Hi,
Basic question I am afraid:
NSCalendarDate *now
NSTimeInterval nowSecs;
NSString *nowStr;
now = [NSCalendarDate calendarDate];
nowStr = [now descriptionWithCalendarFormat:@"%m/%d/%y];
//PRINT THE DATE
NSLog(nowStr);
nowSecs = [now timeIntervalSinceReferenceDate];
NSCalendarDate *now2 = [NSCalendarDate dateWithYear:0 month:0 day:0
hour:0 minute:0 second:nowSecs timeZone:nil];
nowStr = [now2 descriptionWithCalendarFormat:@"%m/%d/%y];
//PRINT THE DATE
NSLog(nowStr);
Why do these dates not match?
Should they not both be referencing the same start time and the
number of seconds since then converted back to now should be today.
Apologies in advance - I am trying to learn obj-c and my last post
was deemed too trivial by the adminstrator, so hopefully this is not
also.
(trying to build a modal password dialog with bullet chars but
tracking real chars - guess I am below trivial - :-) )
Basically I am trying to find the obj-c equivalent of datetosecs and
secstodate that could be used under the classic programming model.
Thanks,
Max.
_______________________________________________
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