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

Polish locales are wrong

XMLWordPrintable

    • b45
    • x86
    • windows_2000



      Name: gm110360 Date: 01/27/2004


      A DESCRIPTION OF THE REQUEST :
      The correct date format in Poland for the 24th of November 2003 is 24.11.03 not 03-11-24.

      JUSTIFICATION :
      Without this being corrected using the java.util.Locale class in Polish or in internationalized software (that might work in Poland) makes no sense.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      DateFormat stamp = (SimpleDateFormat)DateFormat.getDateInstance(
                           DateFormat.SHORT, new Locale("pl", "PL"));
      System.out.println(stamp.format(new Date())); //"dd.MM.yy"

      //Output
      24.11.03
      ACTUAL -
      DateFormat stamp = (SimpleDateFormat)DateFormat.getDateInstance(
                           DateFormat.SHORT, new Locale("pl", "PL"));
      System.out.println(stamp.format(new Date())); //"yy-MM-dd"

      //Output
      03-11-24

      ---------- BEGIN SOURCE ----------
      DateFormat stamp = (SimpleDateFormat)DateFormat.getDateInstance(
                           DateFormat.SHORT, new Locale("pl", "PL"));
      System.out.println(stamp.format(new Date())); //"yy-MM-dd"
      ---------- END SOURCE ----------
      (Incident Review ID: 227738)
      ======================================================================

            jtusla Jiri Tusla (Inactive)
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: