Home
last modified time | relevance | path

Searched refs:isoDate (Results 1 – 7 of 7) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestIsoChronoImpl.java97 LocalDate isoDate = IsoChronology.INSTANCE.date(isoStartDate); in test_IsoChrono_vsCalendar() local
100 cal.set(Calendar.YEAR, isoDate.get(YEAR)); in test_IsoChrono_vsCalendar()
101 cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1); in test_IsoChrono_vsCalendar()
102 cal.set(Calendar.DAY_OF_MONTH, isoDate.get(DAY_OF_MONTH)); in test_IsoChrono_vsCalendar()
104 while (isoDate.isBefore(isoEndDate)) { in test_IsoChrono_vsCalendar()
105 …assertEquals(isoDate.get(DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + isoDa… in test_IsoChrono_vsCalendar()
106 …assertEquals(isoDate.get(MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + isoDa… in test_IsoChrono_vsCalendar() local
107 … assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate); in test_IsoChrono_vsCalendar() local
109 isoDate = isoDate.plus(1, ChronoUnit.DAYS); in test_IsoChrono_vsCalendar()
122 LocalDate isoDate = IsoChronology.INSTANCE.date(isoStartDate); in test_DayOfWeek_IsoChronology_vsCalendar() local
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DJapaneseDate.java132 private final transient LocalDate isoDate; field in JapaneseDate
323 JapaneseDate(LocalDate isoDate) { in JapaneseDate() argument
324 if (isoDate.isBefore(MEIJI_6_ISODATE)) { in JapaneseDate()
327 LocalGregorianCalendar.Date jdate = toPrivateJapaneseDate(isoDate); in JapaneseDate()
330 this.isoDate = isoDate; in JapaneseDate()
341 JapaneseDate(JapaneseEra era, int year, LocalDate isoDate) { in JapaneseDate() argument
342 if (isoDate.isBefore(MEIJI_6_ISODATE)) { in JapaneseDate()
347 this.isoDate = isoDate; in JapaneseDate()
386 return isoDate.lengthOfMonth(); in lengthOfMonth()
394 jcal.set(yearOfEra, isoDate.getMonthValue() - 1, isoDate.getDayOfMonth()); in lengthOfYear()
[all …]
DThaiBuddhistDate.java112 private final transient LocalDate isoDate; field in ThaiBuddhistDate
206 ThaiBuddhistDate(LocalDate isoDate) { in ThaiBuddhistDate() argument
207 Objects.requireNonNull(isoDate, "isoDate"); in ThaiBuddhistDate()
208 this.isoDate = isoDate; in ThaiBuddhistDate()
248 return isoDate.lengthOfMonth(); in lengthOfMonth()
261 return isoDate.range(field); in range()
290 return isoDate.getLong(field); in getLong()
296 return getProlepticYear() * 12L + isoDate.getMonthValue() - 1; in getProlepticMonth()
300 return isoDate.getYear() + YEARS_DIFFERENCE; in getProlepticYear()
321 …return with(isoDate.withYear((getProlepticYear() >= 1 ? nvalue : 1 - nvalue) - YEARS_DIFFERENCE)); in with()
[all …]
DMinguoDate.java112 private final transient LocalDate isoDate; field in MinguoDate
206 MinguoDate(LocalDate isoDate) { in MinguoDate() argument
207 Objects.requireNonNull(isoDate, "isoDate"); in MinguoDate()
208 this.isoDate = isoDate; in MinguoDate()
248 return isoDate.lengthOfMonth(); in lengthOfMonth()
261 return isoDate.range(field); in range()
290 return isoDate.getLong(field); in getLong()
296 return getProlepticYear() * 12L + isoDate.getMonthValue() - 1; in getProlepticMonth()
300 return isoDate.getYear() - YEARS_DIFFERENCE; in getProlepticYear()
321 …return with(isoDate.withYear(getProlepticYear() >= 1 ? nvalue + YEARS_DIFFERENCE : (1 - nvalue) +… in with()
[all …]
DJapaneseEra.java183 LocalDate isoDate = LocalDate.of(date.getYear(), date.getMonth(), date.getDayOfMonth());
184 KNOWN_ERAS[i] = new JapaneseEra(i - ERA_OFFSET + 1, isoDate);
331 static sun.util.calendar.Era privateEraFrom(LocalDate isoDate) { in privateEraFrom() argument
334 if (isoDate.compareTo(era.since) >= 0) { in privateEraFrom()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTestIsoChronology.java149 public void test_toLocalDate(LocalDate isoDate, LocalDate iso) { in test_toLocalDate() argument
150 assertEquals(LocalDate.from(isoDate), iso); in test_toLocalDate()
154 public void test_fromCalendrical(LocalDate isoDate, LocalDate iso) { in test_fromCalendrical() argument
155 assertEquals(IsoChronology.INSTANCE.date(iso), isoDate); in test_fromCalendrical() local
227 LocalDate isoDate = IsoChronology.INSTANCE.date(1726, 1, 4); in test_adjust_toLocalDate() local
228 LocalDate test = isoDate.with(LocalDate.of(2012, 7, 6)); in test_adjust_toLocalDate()
234 LocalDate isoDate = IsoChronology.INSTANCE.date(1726, 1, 4); in test_adjust_toMonth() local
235 assertEquals(IsoChronology.INSTANCE.date(1726, 4, 4), isoDate.with(Month.APRIL)); in test_adjust_toMonth()
243 LocalDate isoDate = IsoChronology.INSTANCE.date(1728, 10, 29); in test_LocalDate_adjustToISODate() local
244 LocalDate test = LocalDate.MIN.with(isoDate); in test_LocalDate_adjustToISODate()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java211 ChronoLocalDate isoDate = LocalDate.of(2000, 1, 1); in test_addTo_wrongChrono() local
214 period.addTo(isoDate); in test_addTo_wrongChrono()
229 ChronoLocalDate isoDate = LocalDate.of(2000, 1, 1); in test_subtractFrom_wrongChrono() local
232 period.subtractFrom(isoDate); in test_subtractFrom_wrongChrono()