• 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: Adding 30 minutes to an NSDate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding 30 minutes to an NSDate


  • Subject: Re: Adding 30 minutes to an NSDate
  • From: Javigator <email@hidden>
  • Date: Wed, 20 Jul 2005 09:31:48 +0200

Am 20. Jul 2005 um 09:14 schrieb Uli Kusterer:

Hi,

is there a recommended way to add 30 minutes to an NSDate? I have an app that announces the time every hour. For that, I'm setting a Timer's next fire time to an NSCalendarDate after each announcement. Now the problem is the wrap-over from 23:00 to 0:00, where I'd also have to add 1 to the day and, if that day is at the end of the month, I'd also have to add to the month.


Can't this be easily done with NSDate's

- (id)addTimeInterval:(NSTimeInterval)seconds

in your case [alarm addTimeInterval:30*60]? Or am I misunderstanding your request?

Best regards,
Joern Janoschek.

_______________________________________________
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


References: 
 >Adding 30 minutes to an NSDate (From: Uli Kusterer <email@hidden>)

  • Prev by Date: Re: Adding 30 minutes to an NSDate
  • Next by Date: file stdarg.h anf float.h into CoreFoundation header not found?
  • Previous by thread: Re: Adding 30 minutes to an NSDate
  • Next by thread: Re: Adding 30 minutes to an NSDate
  • Index(es):
    • Date
    • Thread