In the file MyappAppDelegate.m in the method "application: didFinishLaunchingWithOptions:" I simply wrote:
NSDateFormatter *df = [[NSDateFormatter alloc] init]; [df setDateFormat:@"yyyy"]; NSDate *date = [NSDate date]; NSLog(@"%@", [df stringFromDate:date]); return;
And ran with iPhoneSimulator, the console said:
2010-10-15 20: 38: 43.571 Myapp [59828: 207] 0022
I do not understand what's going on.
So, I created a new Xcode project and tested as described above, after which it returned "2010" correctly. Did I make some bad settings in Myapp?
Thanks in advance.
ksk77 source share