Your code didn’t compile for me unless I changed the YYYY to yyyy. After that it seems to work fine.
0
solved Calendar add method error when going beyond the year
 
Your code didn’t compile for me unless I changed the YYYY to yyyy. After that it seems to work fine.
0
solved Calendar add method error when going beyond the year