• 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: NSFormatter troubles (was: NSScanner troubles)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSFormatter troubles (was: NSScanner troubles)
      • From: WT <email@hidden>
References: 
 >NSScanner troubles (From: WT <email@hidden>)
 >Re: NSScanner troubles (From: Greg Parker <email@hidden>)
 >Re: NSScanner troubles (From: WT <email@hidden>)
 >Re: NSScanner troubles (From: Ken Thomases <email@hidden>)
 >Re: NSScanner troubles (From: Ron Fleckner <email@hidden>)
 >Re: NSScanner troubles (From: WT <email@hidden>)
 >NSFormatter troubles (was: NSScanner troubles) (From: WT <email@hidden>)
 >Re: NSFormatter troubles (was: NSScanner troubles) (From: "Stephen J. Butler" <email@hidden>)
 >Re: NSFormatter troubles (was: NSScanner troubles) (From: WT <email@hidden>)

  • Prev by Date: Re: NSFormatter troubles (was: NSScanner troubles)
  • Next by Date: Re: NSFormatter troubles (was: NSScanner troubles)
  • Previous by thread: Re: NSFormatter troubles (was: NSScanner troubles)
  • Next by thread: Re: NSFormatter troubles (was: NSScanner troubles)
  • Index(es):
    • Date
    • Thread