• 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: NSDate timeIntervalSinceNow problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDate timeIntervalSinceNow problem


  • Subject: Re: NSDate timeIntervalSinceNow problem
  • From: Sherm Pendley <email@hidden>
  • Date: Thu, 22 Oct 2009 23:13:41 -0400

On Thu, Oct 22, 2009 at 11:06 PM, PCWiz <email@hidden> wrote:
>
> NSDate *time = [myDict objectForKey:@"time"];
> NSLog(@"%d", [time timeIntervalSinceNow]);
>
> And the result is this:
>
> 2009-10-22 21:01:18.949 TestApplication[8263:a0f] -2097072
>
> Not sure what's wrong here, I've taken a look at some examples and they seem
> to do the same thing.

NSTimeInterval is a floating-point value, not an integer. You should
use %f to print it.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

References: 
 >NSDate timeIntervalSinceNow problem (From: PCWiz <email@hidden>)

  • Prev by Date: Re: NSDate timeIntervalSinceNow problem
  • Next by Date: Re: NSDate timeIntervalSinceNow problem
  • Previous by thread: Re: NSDate timeIntervalSinceNow problem
  • Next by thread: re: Help debugging "Dangling reference to an invalid object." Core Data error
  • Index(es):
    • Date
    • Thread