• 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
NSDateFormatter and the rigidity of date string input
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDateFormatter and the rigidity of date string input


  • Subject: NSDateFormatter and the rigidity of date string input
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 25 Jun 2007 16:25:52 -0600

I have a 10.0-style NSDateFormatter, and normally it correctly formats date strings that use any US date format. But I'd like to improve the international support, so I've been experimenting with switching it to a 10.4-style formatter.

Now it displays and accepts format strings in the user's locale, but it rejects strings that are entered using a slightly different format, e.g. if I make it a long-style date formatter, then it will only accept input that is in the form of a long date. I want to make it so that the formatter will accept dates in all formats, not just the format that is used to display the string.

How can I do this with a 10.4-style date formatter? I already tried - setLenient: as suggested in the documentation and it didn't work.

Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________

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: NSDateFormatter and the rigidity of date string input
      • From: Deborah Goldsmith <email@hidden>
  • Prev by Date: Re: ObjC 3D engine
  • Next by Date: Re: ObjC 3D engine
  • Previous by thread: Re: Disable popup button cell in table view
  • Next by thread: Re: NSDateFormatter and the rigidity of date string input
  • Index(es):
    • Date
    • Thread