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

DateFormat class: Italian value for Tuesday incorrect

XMLWordPrintable

    • 1.1.1
    • generic, x86
    • generic, solaris_2.5.1
    • Not verified

      DateFormatting of 24-March-97 is incorrect in German, it returns martedl it should be martedì. WORKS Correctly on WinNT.

      Steps to reproduce
      compile and run the attached code:

      import java.util.TimeZone;
      import java.util.Date;
      import java.text.DateFormat;
      import java.util.Locale;

      public class tz {
          public static void main( String argv[] ) {
              // 24-Mar-97 23:00:00 GMT
              Date date = new Date(859244400000L);
              DateFormat formatter = DateFormat.getDateFormat( DateFormat.FULL, Locale.ITALY );
              formatter.setTimeZone( TimeZone.getTimeZone( "ECT" ) );
              
              String tempString = formatter.format( date );
              if( ! tempString.equals( "martedì 25 marzo 1997" ) ) {
                  System.out.println( "Incorrect date format: " +
                                      tempString );
              }
              else {
                  System.out.println( "Okey Dokey" );
              }

          }
      }

            bcbeck Brian Beck (Inactive)
            kasmithsunw Kevin Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: