Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8235968

Bad date(year) formating: Output is 30-12-2020 instead of 30-12-2019

    XMLWordPrintable

    Details

    • CPU:
      x86_64
    • OS:
      generic

      Description

      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


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kravikumar Kiran Sidhartha Ravikumar (Inactive)
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: