Re: [iOS 4.2] NSDateFormatter -init not available in iOS > 3.2 - how to init then?
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