Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
DateFormat/SimpleDateFormat doesn't support Buddhist Era with BuddhistCalendar in non-Thai locales. The following sample program demonstrates the problem. -- import java.util.*; import java.text.*; public class FormatBuddhistCalendar { public static void main(String[] args) { Calendar cal = Calendar.getInstance(new Locale("th", "TH")); SimpleDateFormat fmt = new SimpleDateFormat("G yyyy.MM.dd", Locale.US); fmt.setCalendar(cal); System.out.println(fmt.format(new Date())); } } -- Output: AD 2546.03.17 The era must be "B.E.". ###@###.### 2003-03-17
|