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

DatePicker does not handle 2 digit year numbers correctly in UK Locale

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      I am using the UK locale so short local date format is day/month/year (e.g. 4/7/21 is 4th of July.)

      A DESCRIPTION OF THE PROBLEM :
      If you type a date into the text field of DatePicker using a 2 digit year value - e.g. 1/1/21 - the date is set as being in the first century CE. I.e 1/1/21 comes out as 1st of January AD21 NOT AD2021 as would be expected.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create a trivial application with a DatePicker; use normal logging to show the value of the date entered in the text field.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Date should resolve to the 21st century
      ACTUAL -
      Date resolves to the first century CE

      FREQUENCY : always


        1. Main.java
          1.0 kB
        2. Capture.PNG
          Capture.PNG
          7 kB

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: