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

Month name in pt_BR should not be capitalized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7, 8
    • globalization
    • Fix Understood
    • x86
    • os_x

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      Month names as formatted by SimpleDateFormat for the pt_BR are capitalized. Month names in Brazil are not capitalized. (They are in Portugal, but not Brazil)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the following code:

      Locale brazil = new Locale("pt","BR");
      SimpleDateFormat format = new SimpleDateFormat("d 'de' MMMM", brazil);
      Date date = new Date(2012, 5, 28);
      String result = format.format(date);
      System.out.println(result);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      28 de junho
      ACTUAL -
      28 de Junho

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Locale brazil = new Locale("pt","BR");
      SimpleDateFormat format = new SimpleDateFormat("d 'de' MMMM", brazil);
      Date date = new Date(2012, 5, 28);
      String result = format.format(date);
      System.out.println(result);
      ---------- END SOURCE ----------

            ljiang Leo Jiang (Inactive)
            peytoia Yuka Kamiya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: