You have written YY
which means week.
You need the year, hence you will need to write yy
In case you need more details you can check all the meaning of the different variables in the documentation of SimpleDateFormat class.
y Year Year 1996; 96
Y Week year Year 2009; 09
M Month in year Month July; Jul; 07
w Week in year Number 27
W Week in month Number 2
D Day in year Number 189
d Day in month Number 10