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

Give example for Locale that is English and follows the ISO standards

XMLWordPrintable

    • b23
    • generic
    • generic

      Solution: Although a new Locale constant should not be added, an example snippet using a custom Locale to achieve the equivalent can be added to the java.time.temporal.WeekFields.of(Locale) method

      A DESCRIPTION OF THE PROBLEM :
      Currently the Locale.US and Locale.ENGLISH do not follow the ISO standards when taking things like the first day of the week into account.
      The Locale.UK comes close but is still tied to a specific county and with Java 17 things have changed (September used to be "Sep" and is now "Sept") in this locale breaking some applications.

      So I propose to have a new stable Locale.ISO_ENGLISH (preferably in Java 8, 11 and 17) which is essentially the same as ENGLISH regarding things like names of weeks and months and which follows ISO regarding things like FirstDayOfWeek and MinimalDaysInFirstWeek.



            jlu Justin Lu
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: