-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8, 11, 14
-
x86_64
-
generic
A DESCRIPTION OF THE PROBLEM :
System.out.println(System.getProperty("java.version"));
// 1.8.0_40
DateTimeFormatter readDormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse("2019-12-30", readDormatter);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY");
System.out.println(formatter.format(date));
//output: 30-12-2020
System.out.println(System.getProperty("java.version"));
// 1.8.0_40
DateTimeFormatter readDormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.parse("2019-12-30", readDormatter);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-YYYY");
System.out.println(formatter.format(date));
//output: 30-12-2020
- duplicates
-
JDK-8237539 SimpleDateFormat year format YYYY gives me 2020 already
- Closed
-
JDK-8261011 Java SimpleDateFormat shifts Date by one year
- Closed