• 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
Showing time differences. NSNumberFormatter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Showing time differences. NSNumberFormatter?
      • From: Nir Soffer <email@hidden>
    • Re: Showing time differences. NSNumberFormatter?
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: setKeys + array operators = slowdown
  • Next by Date: Strange crash
  • Previous by thread: Cocoa, WebServices and J5EE working in harmony (almost)
  • Next by thread: Re: Showing time differences. NSNumberFormatter?
  • Index(es):
    • Date
    • Thread