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

Wrong long and full date pattern for fr_CH locale in FormatData_fr_CH

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      linux_ubuntu

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_45"
      Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Linux q 3.13.0-57-generic #95~precise1-Ubuntu SMP Mon Jun 22 09:43:07 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      Our costumers in the french part of Switzerland complained about the date format and we have to agree. It's wrong:

      Java implementation:

      "EEEE, d. MMMM yyyy", // full date pattern
      "d. MMMM yyyy", // long date pattern

      Correct would be:

      "EEEE, d MMMM yyyy", // full date pattern
      "d MMMM yyyy", // long date pattern

      Please also see the following implementation documentation, correctly conforming SN ISO 8601:2005-08:

      http://www-01.ibm.com/support/knowledgecenter/SSS28S_8.1.0/XFDL/i_xfdl_r_formats_fr_CH.dita



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try following code:

      DateFormat.getDateInstance(DateFormat.LONG, Locale.forLanguageTag("fr-ch")).format(new Date(0));

      DateFormat.getDateInstance(DateFormat.FULL, Locale.forLanguageTag("fr-ch")).format(new Date(0));

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Should return "1 janvier 1970" for LONG and "jeudi, 1 janvier 1970" for FULL.
      ACTUAL -
      Actually return "1. janvier 1970" for LONG and "jeudi, 1. janvier 1970" for FULL.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      DateFormat.getDateInstance(DateFormat.LONG, Locale.forLanguageTag("fr-ch")).format(new Date(0));
      DateFormat.getDateInstance(DateFormat.FULL, Locale.forLanguageTag("fr-ch")).format(new Date(0));
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Implementation of mechanism to handle date formatting of french part of Switzerland separately.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ljiang Leo Jiang (Inactive)
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated: