views:

57

answers:

1

Hi.

In MyappAppDelegate.m file at "application: didFinishLaunchingWithOptions:" method, I just wrote:

NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy"];
NSDate *date = [NSDate date];
NSLog(@"%@", [df stringFromDate:date]);
return;

And ran with iPhoneSimulator, console said:

2010-10-15 20:38:43.571 Myapp[59828:207] 0022

I can't understand what's happening.

So I created new Xcode project and tested like above, then it correctly returned '2010'. Did I do some bad settings in Myapp?

Thanks in advance.

+3  A: 

You are using the japanese calendar.
Check Settings/General/International/Calendar. Set it back to gregorian.

fluchtpunkt
Thank you so much, fluchtpunkt!! It's fixed. Well, I'm creating app for Japanese, so I have to still tackle with these mixing. Anyway, thanks!
ksk77