Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDateFormatter question...



Can anyone explain to me why ³today² ends at 12:00 noon instead of 23:59:59
when the following code is executed:

    NSDateFormatter   * theFormatter = [[NSDateFormatter alloc]
initWithDateFormat:@"%c" allowNaturalLanguage:YES];
    NSDate                 * nsDate = [theFormatter
dateFromString:@"today"];
    NSLog(@"%@", nsDate);

This creates a date/time of: 2005-09-14 12:00:00 ­0500 instead of:
2005-09-14 23:59:59 ­0500 or 2005-09-14 11:59:59 PM ­0500. Seems weird that
³today² would not translate to the whole day ­ including the PM part of the
day...

Thanx -

Alec
-----------------------------------------------------------------------
                 Time is Short, and the Water Rises
-----------------------------------------------------------------------


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.