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

Dateformat has no day of the week with FULL option on Japanese, Simplified and T

    XMLWordPrintable

Details

    • rc
    • x86
    • windows_2000

    Description



      Name: dk106046 Date: 05/15/2002

      Full JDK version(s) (from java -version) : JDK 1.2.2 , JDK 1.3.0 , JDK 1.3.1 and JDK 1.4

      1. Compile and run the DateDemo.java testcase below.
      2. While running this testcase, run separately on a Win2K Japanese, Simplified Chinese and Traditional Chinese machines and observe that the Day of the week is not a part of the output while the day of the week appears in the English Locale.

      import java.util.*;
      import java.text.*;
      public class DateDemo
      {
         public static void main(String args[])
         {
            Locale loc = Locale.getDefault();
            String encode = loc.getLanguage() + "_" + loc.getCountry();
            System.out.println(encode);
            Date now = new Date();
            DateFormat s = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL,loc);
            System.out.println(s.format(now));
            Locale us = Locale.US;
            encode = us.getLanguage() + "_" + us.getCountry();
            System.out.println(encode);
            s = DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL,us);
            System.out.println(s.format(now));
         }
      }

      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              lefan Leon Fan (Inactive)
              dkorbel David Korbel (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: