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

Cannot get correct localized standalone month display name (java.time).

XMLWordPrintable

    • generic
    • generic

      FULL PRODUCT VERSION :
      Java 8

      ADDITIONAL OS VERSION INFORMATION :
      Windows 8

      A DESCRIPTION OF THE PROBLEM :
      The following code does not return the expected localized full month display name.

      String fullMonthName = Month.JANUARY.getDisplayName(TextStyle.FULL_STANDALONE, Locale.US);

      (This returns a string "1" instead of the expected string "January". All the other month constants currently perform similarly.)

      I realize that the English language does not have separate strings for standalone or date-integrated month names, but for all similar languages with no difference, I believe the expected behavior of this function would be to return the same month string for TextStyle.FULL_STANDALONE or TextStyle.FULL, and certainly not to return the month number as a string.





      REPRODUCIBILITY :
      This bug can be reproduced always.

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: