• 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: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?


  • Subject: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • From: Siegfried <email@hidden>
  • Date: Sun, 12 Dec 2010 21:14:47 -0200

On 12/12/2010, at 21:01, Kyle Sluder wrote:

> On Sun, Dec 12, 2010 at 2:58 PM, Siegfried
> <email@hidden> wrote:
>> On 12/12/2010, at 20:41, WT wrote:
>>
>>> Hello,
>>>
>>> according to the iOS 4.2 NSDateFormatter class documentation, the -init method is available in iOS 2.0 through iOS 3.2,
>>
>> Sorry, but the init method? Just to confirm, where exactly in the documentation did you read about this?
>
> http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSDateFormatter_Class/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/doc/uid/20000447-BAJBJEGB
>
> --Kyle Sluder

Ouch! :-)

NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];

[dateFormatter setLocale:[NSLocale systemLocale]];
[dateFormatter setDateStyle:NSDateFormatterShortStyle];

NSLog(@"%@", [dateFormatter stringFromDate:[NSDate date]]);

Looks like works here


_______________________________________________

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

References: 
 >[iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then? (From: WT <email@hidden>)
 >Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then? (From: Siegfried <email@hidden>)
 >Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Next by Date: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Previous by thread: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Next by thread: Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
  • Index(es):
    • Date
    • Thread