• 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: Question about NSLocale with NSDateFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about NSLocale with NSDateFormatter


  • Subject: Re: Question about NSLocale with NSDateFormatter
  • From: mmalcolm crawford <email@hidden>
  • Date: Thu, 10 Nov 2005 16:21:09 -0800


On Nov 10, 2005, at 3:34 PM, Daniel Mischler wrote:

Where are things going wrong? Couldn't find anything in the documentation that helped.

<http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSDateFormatter.html>


"With Mac OS X version 10.4 and later, NSDateFormatter has two modes of operation (or behaviors). By default, instances of NSDateFormatter have the same behavior as they did on Mac OS X versions 10.0 to 10.3. You can, however, configure instances (or set a default for all instances) to adopt a new behavior implemented for Mac OS X version 10.4. See Data Formatting for a full description of the old and new behaviors.
"If you initialize a formatter instance using - initWithDateFormat:allowNaturalLanguage:, you are (for backwards compatibility reasons) creating an “old-style” date formatter."


[...]

setLocale:
Sets the locale of the receiver.

- (void)setLocale:(NSLocale *)locale

Discussion

The locale is set to locale.

Availability

****Available in Mac OS X version 10.4 and later.****


<http://developer.apple.com/documentation/Cocoa/Conceptual/ DataFormatting/Articles/dfDateFormatting10_4.html>


"The new methods in 10.4 do not do anything when invoked on a 10.0- style formatter, and return a generic return value when required to return something—you should therefore not invoke the new methods on a 10.0-style formatter. On a 10.4-style formatter, the old methods map approximately to one or more new methods or attributes, but you should use the new methods directly when possible."



mmalc

_______________________________________________
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: 
 >Question about NSLocale with NSDateFormatter (From: Daniel Mischler <email@hidden>)

  • Prev by Date: Re: Special characters
  • Next by Date: Re: MVC and NSBezierPath encoding?
  • Previous by thread: Re: Question about NSLocale with NSDateFormatter
  • Next by thread: Re: Question about NSLocale with NSDateFormatter
  • Index(es):
    • Date
    • Thread