Re: NSFormatter troubles (was: NSScanner troubles)
Re: NSFormatter troubles (was: NSScanner troubles)
- Subject: Re: NSFormatter troubles (was: NSScanner troubles)
- From: Scott Ribe <email@hidden>
- Date: Sat, 11 Dec 2010 17:31:29 -0700
On Dec 11, 2010, at 4:52 PM, WT wrote:
> My understanding is that setting a style is useful when you want to output a string from a given number or date, not when you want to read in a number or date from an input string. How would I know ahead of time what style the strings presented to me are going to be using? It doesn't make sense to me that I need to set the style to read the data.
Parsing of dates (& times) in Cocoa (& Core Foundation) is just plain lame. Your output format does totally affect what it can parse, and it provides no good way to just flexibly parse a date in any common format for the current locale.
I learned this last week, while expunging a last little bit of deprecated code--the old International Utilities, which were in my opinion far superior for parsing dates & times.
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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