• 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: Issues with the NSFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issues with the NSFormatter


  • Subject: Re: Issues with the NSFormatter
  • From: Ricky Sharp <email@hidden>
  • Date: Mon, 05 Jun 2006 06:42:31 -0500

On Monday, June 05, 2006, at 03:22AM, Nishant Singh <email@hidden> wrote:

>We are capturing user entered date in a text-field. The text-field is
>attached to a date-formatter.
>This works fine for most of the Time Zones and Region formats.
>I set my system Region Format to Canada (which has format as DD-MM-YY
>for dates) and Timezone to EDT.
>
>The date entered was 11-12-2007 (ie, 11th of December,2007)
>However when this date was passed to method dateFromString (and even
>getObjectValue:forString:errorDescription)  of NSFormatter,
>it got converted to 12 of November,2007. Any date entered in the
>format DD-MM-YYYY where DD <13 is getting interpreted as MM-DD-YYYY.
>
>If I enter the same date as 11/12/2007 (that is, 11-Dec-2007) then it
>works fine.
>
>Is this an issue with the NSFormatter for Canada region?
>
>Pointers are welcome.

Don't have IB in front of me, but I believe there's something like a "use localized content" checkbox in IB on the formatter inspector pane.  Is that checked?

--
Rick Sharp
Instant Interactive(tm)

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

This email sent to email@hidden

References: 
 >Issues with the NSFormatter (From: "Nishant Singh" <email@hidden>)

  • Prev by Date: Re: Question about Saving a document
  • Next by Date: XXFinderView?
  • Previous by thread: Issues with the NSFormatter
  • Next by thread: WebKit & high memory consumption
  • Index(es):
    • Date
    • Thread