Re: NSDate isEqual to...

2009-03-20 Thread Mike Abdullah
On 20 Mar 2009, at 20:50, Charles E. Heizer wrote: Hello, I'm playing around with date time stuff right now and I'm trying to figure out the bets way to determine if one datetime is equal to another. The problem I'm running in to is isEqualToDate does not appear to work, the NSLog

Re: NSDate isEqual to...

2009-03-20 Thread Shawn Erickson
On Fri, Mar 20, 2009 at 1:50 PM, Charles E. Heizer heiz...@llnl.gov wrote: Hello, I'm playing around with date time stuff right now and I'm trying to figure out the bets way to determine if one datetime is equal to another. The problem I'm running in to is isEqualToDate does not appear to

Re: NSDate isEqual to...

2009-03-20 Thread Charles E. Heizer
Thanks, No it's just playing around right now. It would be nice to be able to specify if you wanted NSDate to be sub-second or second precision based. Just as question, can NSDate be overridden to be second precision based? Thanks, - Charles On Mar 20, 2009, at 2:05 PM, Mike Abdullah

Re: NSDate isEqual to...

2009-03-20 Thread mm w
+ (BOOL)isADayEqualToAnotherDay:(NSDate*)date anotherDate:(NSDate*)anotherDate { NSCalendar *cal; NSDateComponents *componentsFromDate, *componentsFromAnotherDate; NSUInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit; cal =

Re: NSDate isEqual to...

2009-03-20 Thread mm w
yes, see my previous message; you should NSLogged a NSDate object Cheers! On Fri, Mar 20, 2009 at 2:17 PM, Charles E. Heizer heiz...@llnl.gov wrote: Thanks, No it's just playing around right now. It would be nice to be able to specify if you wanted NSDate to be sub-second or second precision

Re: NSDate isEqual to...

2009-03-20 Thread Mike Abdullah
On 20 Mar 2009, at 21:17, Charles E. Heizer wrote: Thanks, No it's just playing around right now. It would be nice to be able to specify if you wanted NSDate to be sub-second or second precision based. Just as question, can NSDate be overridden to be second precision based?

Re: NSDate isEqual to...

2009-03-20 Thread mm w
Right the comment of Mike is fair, I don't know what you are doing (a lie), anyway your interest is to know a time interval rather than a date you should design a object with a referential start-time: CFAbsoluteTime timeNow(void) { return (CFAbsoluteTime) (CFAbsoluteTimeGetCurrent() -

Re: NSDate isEqual to...

2009-03-20 Thread Charles E. Heizer
Thanks a bunch for clearing this all up for me. I have converted my test code to use timeIntervalSince1970 and it appears to be working fine. My main concern is starting from a specific point in time and then have a reliable and consistent interval to count on. Thanks again, Charles

Re: NSDate isEqual to...

2009-03-20 Thread Charles Srstka
On Mar 20, 2009, at 6:54 PM, Charles E. Heizer wrote: Thanks a bunch for clearing this all up for me. I have converted my test code to use timeIntervalSince1970 and it appears to be working fine. My main concern is starting from a specific point in time and then have a reliable and