Showing time differences. NSNumberFormatter?
Showing time differences. NSNumberFormatter?
- Subject: Showing time differences. NSNumberFormatter?
- From: Ferhat Ayaz <email@hidden>
- Date: Tue, 16 Jan 2007 08:29:30 +0100
I want to show time difference on a NSTextField which I have
obtained with
NSDate* startTime = [self valueForKey:@"startTime"];
NSDate* endTime = [self valueForKey:@"endTime"];
NSTimeInterval interval = [endTime timeIntervalSinceDate:startTime];
return [NSDate dateWithTimeIntervalSinceReferenceDate:interval];
The format must be <days>:<hours>:<minutes> . The format string %d:%I:
%M show for identical startTime and EndTime (interval is 0 in other
words) 1:1:0. Day and hours has always one more as expected. Day will
also not be greater then 31 because it is the day of month.
Is there another and serious way to show time differences?
Thanks,
Ferhat
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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