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

Missing Buddhist Era mark in Java 1.4 beta

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta2
    • generic
    • generic



      Name: krC82822 Date: 06/14/2001


      14 June 2001, eval1127@eng -- see also # 4071770.
      -----------------------
      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      Buddhist Era is supported in Java 1.2.2 Thai Localization,
      but Java 1.4 beta has missed this functionality.

      Thailand, th_TH locale, do not use the Gregorian calendar system.

      they use Buddhist Calendar system, also their own "Era mark".


      running below program
      ----

      import java.util.*;
      import java.text.*;

      public class testDateFormat {


        static public void main(String args[]) {
          Locale locale = new Locale("th","TH");
          TimeZone tz = TimeZone.getTimeZone("Asia/Bangkok");
          Calendar caln = Calendar.getInstance(tz,locale);

          Date date = caln.getTime();
         
      System.out.println(DateFormat.getDateInstance(DateFormat.FULL,locale).format(date));
       }
      }
      ----

      with Java 1.4 beta
      the era mark will shown as "\u0e04.\u0e28."
      (means "AC", which is era mark of Gregorian Calendar --> WRONG)

      with Java 1.2.2 Thai
      the era mark will shown as "\u0e1e.\u0e28."
      (means "BE", abbreviated form of "Buddhist Era" --> CORRECT)

      ----

      Note that both give same "era number" (2544), but different in "era mark".

      this maybe means Java 1.4 beta knows the Buddhist Calendar,
      but it has a wrong "era mark".

      ----

      see the captured screen of running result,

      http://bacteria.thethai.net/bugs/j2se14b/dateformat1/DateFormat_wrong_era.html

      ----

      download Java 2 v.1.2.2 Thai Localization for testing at

      http://www.sun.co.th/developers/thailand

      ----
      (Review ID: 126576)
      ======================================================================

            joconnersunw John Oconner (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: