• 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: Uli Kusterer <email@hidden>
  • Date: Wed, 20 Jul 2005 19:27:55 +0200


Am Jul 20, 2005 um 9:24:11 schrieb j o a r:
Doesn't -[NSCalendarDate dateByAddingYears:months:days:hours:minutes:seconds:] work for you?

Um, not quite. My problem is that I want it to be exact. If I add a certain number of hours, I'll get drift over time. So, I guess my question wasn't quite correctly formulated. But I just realised that I can probably use a hybrid approach, where I create my date by pinning the current date to the half-hour mark and then using the above function. That will take care of all the nastiness while still being exact.


Thanks for whacking me over the head with a cluebat. I think I completely overlooked this method.

Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ 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
  • Follow-Ups:
    • Re: Adding 30 minutes to an NSDate
      • From: "Sean McBride" <email@hidden>
References: 
 >Adding 30 minutes to an NSDate (From: Uli Kusterer <email@hidden>)
 >Re: Adding 30 minutes to an NSDate (From: j o a r <email@hidden>)

  • Prev by Date: Re: Core Data Implementation question
  • Next by Date: Re: What am I doing wrong in my drag loop? Dragging jumps all over the place.
  • Previous by thread: Re: Adding 30 minutes to an NSDate
  • Next by thread: Re: Adding 30 minutes to an NSDate
  • Index(es):
    • Date
    • Thread