Use Xcode help for NSDateFormatter. From the documentation:
It uses yyyy to specify the year component. 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.
2014 started on a Wednesday. Tuesday, 31st Dec. 2013, is in the same week - week 1 of 2014. That's what YYYY displays. yyyy displays 2013.