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

SimpleDateFormat.format Portuguese Month should not be capitalized

    XMLWordPrintable

Details

    • b96
    • x86
    • linux
    • Verified

    Description

      FULL PRODUCT VERSION :
      Java 1.4, 5.0, 6.0 all have these issues.

      ADDITIONAL OS VERSION INFORMATION :
      This should be on all OS's. We tried Linux, Windows, CentOS

      A DESCRIPTION OF THE PROBLEM :
      The java code as below :

      Date d=new Date();
      Locale locale=new Locale("ru","RU");
      SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd",locale);
      System.out.println(SimpleDateFormat.format(d));

      With Sun Java 1.4, 5.0, 6.0 on russian locale, It shows the first char of the month in upper case for eg: it shows 'A' instead of 'a' for August in russian. It should return the month starting with lower case rather than starting the month name with uppercase char.

      This problem also exists in Portuguese.

      We have confirmation from 2 separate localization teams in Portuguese and Russian month are in lower case always.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Date d=new Date();
      Locale locale=new Locale("ru","RU");
      SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd",locale);
      System.out.println(SimpleDateFormat.format(d));

      For Portuguese - Brazil:
      Locale locale=new Locale("pt","BR");

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Russian and Portuguese months are always lower cased.
      ACTUAL -
      These 2 locales current output upper case.

      IBM JDK already fixed this:
       http://www.ibm.com/developerworks/java/jdk/aix/j564/fixes.html
      ibm and sun jdk all exists this bug. Pls look at below links: http://www-01.ibm.com/support/docview.wss?uid=swg1IZ29705


      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Issue Links

          Activity

            People

              yhuang Yong Huang (Inactive)
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: