A common mistake is to use YYYY. yyyy specifies the calendar year whereas YYYY specifies the year (of “Week of Year”), used in the ISO year-week calendar. In most cases, yyyy and YYYY yield the same number, however they may be different. Typically you should use the calendar year.
你的格式化字串裡應該用小寫的 yyyy 而不是大寫的 YYYY。大寫的 YYYY 會格式化年份為 ISO週日曆 中的年份,大部分時候是相同的,但是在一年的年末和年初的幾天就可能會不同,詳見維基百科。
refs:https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW44