What if you use yyyy-MM as format?
Y is “week year” and y is year. Using Y instead of y might cause unexpected results in the last week of December and the first week of January.
Letter Date or Time Component Presentation Examples
y Year Year 1996; 96
Y Week year Year 2009; 09