Mailing Lists: Apple Mailing Lists

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

Re: NSDateFormatter question...




On Sep 15, 2005, at 6:58 AM, Alec Carlson wrote:

If the user enters “Today” I expect that :
dateFromString: would return either the current date/time as the best result
for the natural language translation of “today” or 11:59:59 PM as the whole
time range of today.

Since NSDates and NSCalendarDates are instants in time, and not time ranges, I'd say that choosing noon for "today" is a reasonable default. If you make it any other time, I can see equally strong arguments for making it 00:00:00GMT, or 12:59:59GMT+12, or the same values in the current time zone. Whatever they picked, it couldn't be what everybody wanted.


It sounds to me like you need a time range class for what you want to do. Another possibility is to have the user enter the date and time separately.


-jcr


John C. Randolph <email@hidden> (408) 914-0013 Roaming Cocoa Engineer, Available for your projects at great Expense and Inconvenience.



_______________________________________________
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
References: 
 >Re: NSDateFormatter question... (From: Alec Carlson <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.