根据unixtimestamp.com - 2013年12月31日午夜时间戳为1388448000.
那为什么会这样呢?
在ViewController.m
:
NSDateFormatter *titleFormatter = [[NSDateFormatter alloc] init]; _titleFormatter = titleFormatter;
在LLDB:
(lldb) po [NSDate dateWithTimeIntervalSince1970:1388448000] 2013-12-31 00:00:00 +0000 (lldb) p [NSDate dateWithTimeIntervalSince1970:1388448000] (id) $1 = 0x16e5c0b0 (lldb) po [self.titleFormatter stringFromDate:$1] December 2014
oliland.. 6
我的错.在我的代码中的某处:
[self.titleFormatter setDateFormat:@"MMMM YYYY"]
当然,在这种情况下,YYYY应该是yyyy.NSDateFormatter中"YYYY"和"yyyy"之间的区别
我的错.在我的代码中的某处:
[self.titleFormatter setDateFormat:@"MMMM YYYY"]
当然,在这种情况下,YYYY应该是yyyy.NSDateFormatter中"YYYY"和"yyyy"之间的区别