Please take a look at the following code:
Date date = new GregorianCalendar (2019, Calendar.DECEMBER, 30).getTime ();
System.out.println (date);
SimpleDateFormat formatter = new SimpleDateFormat ("dd.MM.YYYY");
System.out.println (formatter.format (date));
The output is as follow:
Mon Dec 30 00:00:00 CET 2019
30.12.2020
Look at the year. What is wrong?
Same problem with '2019-12-31' while '2019-12-29' is ok.
Best regards Thomas