test/java/time/test/java/time/temporal/TestThaiBuddhistChronoImpl.java
Print this page
*** 63,74 ****
import java.util.TimeZone;
import java.time.LocalDate;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;
! import java.time.temporal.ChronoLocalDate;
! import java.time.calendar.ThaiBuddhistChrono;
import org.testng.annotations.Test;
import org.testng.annotations.DataProvider;
/**
--- 63,75 ----
import java.util.TimeZone;
import java.time.LocalDate;
import java.time.temporal.ChronoField;
import java.time.temporal.ChronoUnit;
! import java.time.chrono.ChronoLocalDate;
! import java.time.chrono.ThaiBuddhistChronology;
! import java.time.chrono.ThaiBuddhistDate;
import org.testng.annotations.Test;
import org.testng.annotations.DataProvider;
/**
*** 95,105 ****
Locale locale = Locale.forLanguageTag("th-TH--u-ca-buddhist");
assertEquals(locale.toString(), "th_TH", "Unexpected locale");
Calendar cal = java.util.Calendar.getInstance(locale);
assertEquals(cal.getCalendarType(), "buddhist", "Unexpected calendar type");
! ChronoLocalDate<ThaiBuddhistChrono> thaiDate = ThaiBuddhistChrono.INSTANCE.date(isoStartDate);
cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR));
cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1);
cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH));
--- 96,106 ----
Locale locale = Locale.forLanguageTag("th-TH--u-ca-buddhist");
assertEquals(locale.toString(), "th_TH", "Unexpected locale");
Calendar cal = java.util.Calendar.getInstance(locale);
assertEquals(cal.getCalendarType(), "buddhist", "Unexpected calendar type");
! ThaiBuddhistDate thaiDate = ThaiBuddhistChronology.INSTANCE.date(isoStartDate);
cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR));
cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1);
cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH));