Home
last modified time | relevance | path

Searched refs:YEARS (Results 1 – 25 of 43) sorted by relevance

12

/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestChronoLocalDate.java89 dates.add(date.minus(10, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO()
90 dates.add(date.minus(1, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO()
98 dates.add(date.plus(1, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO()
99 dates.add(date.plus(10, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO()
113 dates.add(date.minus(10, ChronoUnit.YEARS));
114 dates.add(date.minus(1, ChronoUnit.YEARS));
122 dates.add(date.plus(1, ChronoUnit.YEARS));
123 dates.add(date.plus(10, ChronoUnit.YEARS));
DTestExampleCode.java109 .plus(1, ChronoUnit.YEARS) in test_chronoPackageExample()
162 .plus(1, ChronoUnit.YEARS) in test_calendarPackageExample()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYear.java70 import static java.time.temporal.ChronoUnit.YEARS;
408 assertEquals(TEST_2008.isSupported(ChronoUnit.YEARS), true); in test_isSupported_TemporalUnit()
441 {TEST_2008, TemporalQueries.precision(), ChronoUnit.YEARS}, in data_query()
602 {Year.of(1), 1, ChronoUnit.YEARS, Year.of(2), null}, in data_plus_long_TemporalUnit()
603 {Year.of(1), -12, ChronoUnit.YEARS, Year.of(-11), null}, in data_plus_long_TemporalUnit()
604 {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, in data_plus_long_TemporalUnit()
605 {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, in data_plus_long_TemporalUnit()
606 {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, in data_plus_long_TemporalUnit()
607 {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, in data_plus_long_TemporalUnit()
608 {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(999999999), null}, in data_plus_long_TemporalUnit()
[all …]
DTCKYearMonth.java73 import static java.time.temporal.ChronoUnit.YEARS;
449 assertEquals(TEST_2008_06.isSupported(ChronoUnit.YEARS), true); in test_isSupported_TemporalUnit()
746 {YearMonth.of(1, 10), 1, ChronoUnit.YEARS, YearMonth.of(2, 10), null}, in data_plus_long_TemporalUnit()
747 {YearMonth.of(1, 10), -12, ChronoUnit.YEARS, YearMonth.of(-11, 10), null}, in data_plus_long_TemporalUnit()
748 {YearMonth.of(1, 10), 0, ChronoUnit.YEARS, YearMonth.of(1, 10), null}, in data_plus_long_TemporalUnit()
749 {YearMonth.of(999999999, 12), 0, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, in data_plus_long_TemporalUnit()
750 {YearMonth.of(-999999999, 1), 0, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, in data_plus_long_TemporalUnit()
751 {YearMonth.of(0, 1), -999999999, ChronoUnit.YEARS, YearMonth.of(-999999999, 1), null}, in data_plus_long_TemporalUnit()
752 {YearMonth.of(0, 12), 999999999, ChronoUnit.YEARS, YearMonth.of(999999999, 12), null}, in data_plus_long_TemporalUnit()
961 {YearMonth.of(1, 10), 1, ChronoUnit.YEARS, YearMonth.of(0, 10), null}, in data_minus_long_TemporalUnit()
[all …]
DTCKLocalDate.java82 import static java.time.temporal.ChronoUnit.YEARS;
703 assertEquals(TEST_2007_07_15.isSupported(ChronoUnit.YEARS), true);
1041 MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS);
1047 MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS);
1078 LocalDate.of(Year.MAX_VALUE, 1, 1).plus(1, ChronoUnit.YEARS);
1083 LocalDate.of(Year.MIN_VALUE, 1, 1).plus(-1, ChronoUnit.YEARS);
1425 MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS);
1431 MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS);
1462 LocalDate.of(Year.MAX_VALUE, 1, 1).minus(-1, ChronoUnit.YEARS);
1467 LocalDate.of(Year.MIN_VALUE, 1, 1).minus(1, ChronoUnit.YEARS);
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DChronoPeriodImpl.java62 import static java.time.temporal.ChronoUnit.YEARS;
107 private static final List<TemporalUnit> SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
141 if (unit == ChronoUnit.YEARS) { in get()
260 temporal = temporal.plus(years, YEARS); in addTo()
268 temporal = temporal.plus(years, YEARS); in addTo()
286 temporal = temporal.minus(years, YEARS); in subtractFrom()
294 temporal = temporal.minus(years, YEARS); in subtractFrom()
DChronoLocalDateImpl.java205 case YEARS: return plusYears(amountToAdd); in plus()
384 case YEARS: return monthsUntil(end) / 12; in until()
/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java82 import static java.time.temporal.ChronoUnit.YEARS;
432 DAY_OF_YEAR("DayOfYear", DAYS, YEARS, ValueRange.of(1, 365, 366)),
477 ALIGNED_WEEK_OF_YEAR("AlignedWeekOfYear", WEEKS, YEARS, ValueRange.of(1, 53)),
488 MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12), "month"),
543 YEAR_OF_ERA("YearOfEra", YEARS, FOREVER, ValueRange.of(1, Year.MAX_VALUE, Year.MAX_VALUE + 1)),
567 YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE), "year"),
DWeekFields.java77 import static java.time.temporal.ChronoUnit.YEARS;
719 return new ComputedDayOfField("WeekOfYear", weekDef, WEEKS, YEARS, WEEK_OF_YEAR_RANGE); in ofWeekOfYearField()
789 } else if (rangeUnit == YEARS) { // week-of-year in getFrom()
971 if (rangeUnit == YEARS) { // week-of-year in resolve()
1059 if (rangeUnit == YEARS) { // only have values for week-of-year in getDisplayName()
1110 } else if (rangeUnit == YEARS) { // week-of-year in isSupportedBy()
1127 } else if (rangeUnit == YEARS) { // week-of-year in rangeRefinedBy()
DTemporalAdjusters.java69 import static java.time.temporal.ChronoUnit.YEARS;
270 return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS); in firstDayOfNextYear()
DChronoUnit.java149 YEARS("Years", Duration.ofSeconds(31556952L)), enumConstant
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestChronoUnit.java69 import static java.time.temporal.ChronoUnit.YEARS;
109 assertEquals(YEARS.between(start, end), expected); in test_yearsBetween()
114 assertEquals(YEARS.between(end, start), -expected); in test_yearsBetweenReversed()
119 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 30)), expected); in test_yearsBetween_LocalDateTimeSameTime()
125 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); in test_yearsBetween_LocalDateTimeLaterTime()
127 assertEquals(YEARS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); in test_yearsBetween_LocalDateTimeLaterTime()
133 …assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.… in test_yearsBetween_ZonedDateSameOffset()
140 …assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.… in test_yearsBetween_ZonedDateLaterOffset()
142 …assertEquals(YEARS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.… in test_yearsBetween_ZonedDateLaterOffset()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestReducedParser.java67 import static java.time.temporal.ChronoUnit.YEARS;
394 {IsoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono()
395 {IsoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono()
397 {HijrahChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono()
398 {HijrahChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono()
400 {JapaneseChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono()
401 {JapaneseChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono()
403 {MinguoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono()
404 {MinguoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, in provider_reducedWithChrono()
406 {ThaiBuddhistChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, in provider_reducedWithChrono()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoUnit.java74 import static java.time.temporal.ChronoUnit.YEARS;
106 {YEARS, true, false, true}, in data_chronoUnit()
137 {YEARS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2001, 1, 10)}, in data_unitAndTemporal()
152 {YEARS, LocalTime.of(1, 2, 3, 400), false, 1, null}, in data_unitAndTemporal()
DTCKChronoField.java97 import static java.time.temporal.ChronoUnit.YEARS;
125 {YEAR, YEARS, FOREVER}, in data_fieldUnit()
126 {MONTH_OF_YEAR, MONTHS, YEARS}, in data_fieldUnit()
129 {DAY_OF_YEAR, DAYS, YEARS}, in data_fieldUnit()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoUnitSerialization.java74 import static java.time.temporal.ChronoUnit.YEARS;
101 {YEARS}, in data_chronoUnit()
/libcore/ojluni/src/main/java/java/time/
DPeriod.java66 import static java.time.temporal.ChronoUnit.YEARS;
148 private static final List<TemporalUnit> SUPPORTED_UNITS = List.of(YEARS, MONTHS, DAYS);
267 if (unit == ChronoUnit.YEARS) { in from()
429 if (unit == ChronoUnit.YEARS) { in get()
893 temporal = temporal.plus(years, YEARS); in addTo()
946 temporal = temporal.minus(years, YEARS); in subtractFrom()
DYear.java71 import static java.time.temporal.ChronoUnit.YEARS;
399 … return unit == YEARS || unit == DECADES || unit == CENTURIES || unit == MILLENNIA || unit == ERAS; in isSupported()
705 case YEARS: return plusYears(amountToAdd); in plus()
820 return (R) YEARS; in query()
912 case YEARS: return yearsUntil; in until()
DYearMonth.java74 import static java.time.temporal.ChronoUnit.YEARS;
387 …return unit == MONTHS || unit == YEARS || unit == DECADES || unit == CENTURIES || unit == MILLENNI… in isSupported()
803 case YEARS: return plusYears(amountToAdd); in plus()
1045 case YEARS: return monthsUntil / 12; in until()
/libcore/luni/src/main/java/javax/xml/datatype/
DDuration.java158 boolean yearSet = isSet(DatatypeConstants.YEARS); in getXMLSchemaType()
230 return getFieldValueAsInt(DatatypeConstants.YEARS); in getYears()
892 BigInteger years = (BigInteger) getField(DatatypeConstants.YEARS); in toString()
DDatatypeConstants.java129 public static final Field YEARS = new Field("YEARS", 0); field in DatatypeConstants
/libcore/luni/src/test/java/libcore/javax/xml/datatype/
DDatatypeConstantsTest.java24 assertEquals(0, DatatypeConstants.YEARS.getId()); in testField_getId()
DDurationImpl.java69 if (y >= 0) { fields.put(DatatypeConstants.YEARS, y); } in DurationImpl()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoPeriod.java62 import static java.time.temporal.ChronoUnit.YEARS;
122 assertEquals(period.get(YEARS), 1); in test_get()
137 assertEquals(period.getUnits().get(0), YEARS); in test_getUnits()
/libcore/luni/src/test/java/libcore/java/time/
DInstantTest.java46 assertEquals(false, Instant.EPOCH.isSupported(ChronoUnit.YEARS)); in test_isSupported_TemporalUnit()

12