/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestChronoLocalDate.java | 89 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));
|
D | TestExampleCode.java | 109 .plus(1, ChronoUnit.YEARS) in test_chronoPackageExample() 162 .plus(1, ChronoUnit.YEARS) in test_calendarPackageExample()
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKYear.java | 70 import static java.time.temporal.ChronoUnit.YEARS; 384 assertEquals(TEST_2008.isSupported(ChronoUnit.YEARS), true); in test_isSupported_TemporalUnit() 417 {TEST_2008, TemporalQueries.precision(), ChronoUnit.YEARS}, in data_query() 578 {Year.of(1), 1, ChronoUnit.YEARS, Year.of(2), null}, in data_plus_long_TemporalUnit() 579 {Year.of(1), -12, ChronoUnit.YEARS, Year.of(-11), null}, in data_plus_long_TemporalUnit() 580 {Year.of(1), 0, ChronoUnit.YEARS, Year.of(1), null}, in data_plus_long_TemporalUnit() 581 {Year.of(999999999), 0, ChronoUnit.YEARS, Year.of(999999999), null}, in data_plus_long_TemporalUnit() 582 {Year.of(-999999999), 0, ChronoUnit.YEARS, Year.of(-999999999), null}, in data_plus_long_TemporalUnit() 583 {Year.of(0), -999999999, ChronoUnit.YEARS, Year.of(-999999999), null}, in data_plus_long_TemporalUnit() 584 {Year.of(0), 999999999, ChronoUnit.YEARS, Year.of(999999999), null}, in data_plus_long_TemporalUnit() [all …]
|
D | TCKYearMonth.java | 73 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 …]
|
D | TCKLocalDate.java | 82 import static java.time.temporal.ChronoUnit.YEARS; 658 assertEquals(TEST_2007_07_15.isSupported(ChronoUnit.YEARS), true); 996 MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS); 1002 MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS); 1033 LocalDate.of(Year.MAX_VALUE, 1, 1).plus(1, ChronoUnit.YEARS); 1038 LocalDate.of(Year.MIN_VALUE, 1, 1).plus(-1, ChronoUnit.YEARS); 1356 MockSimplePeriod period = MockSimplePeriod.of(-1, ChronoUnit.YEARS); 1362 MockSimplePeriod period = MockSimplePeriod.of(1, ChronoUnit.YEARS); 1393 LocalDate.of(Year.MAX_VALUE, 1, 1).minus(-1, ChronoUnit.YEARS); 1398 LocalDate.of(Year.MIN_VALUE, 1, 1).minus(1, ChronoUnit.YEARS); [all …]
|
D | TCKPeriod.java | 64 import static java.time.temporal.ChronoUnit.YEARS; 169 if (unit == YEARS) { in factory_from_TemporalAmount_YearsDays() 178 list.add(YEARS); in factory_from_TemporalAmount_YearsDays() 203 return Collections.<TemporalUnit>singletonList(YEARS); in factory_from_TemporalAmount_Years_tooBig() 1140 assertEquals(units.get(0), ChronoUnit.YEARS, "Period.getUnits contains ChronoUnit.YEARS"); in test_Period_getUnits() 1151 {2, ChronoUnit.YEARS}, in data_goodTemporalUnit()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoPeriodImpl.java | 62 import static java.time.temporal.ChronoUnit.YEARS; 109 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS)); 142 if (unit == ChronoUnit.YEARS) { in get() 262 temporal = temporal.plus(years, YEARS); in addTo() 270 temporal = temporal.plus(years, YEARS); in addTo() 288 temporal = temporal.minus(years, YEARS); in subtractFrom() 296 temporal = temporal.minus(years, YEARS); in subtractFrom()
|
D | ChronoLocalDateImpl.java | 205 case YEARS: return plusYears(amountToAdd); in plus() 384 case YEARS: return monthsUntil(end) / 12; in until()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | ChronoField.java | 82 import static java.time.temporal.ChronoUnit.YEARS; 412 DAY_OF_YEAR("DayOfYear", DAYS, YEARS, ValueRange.of(1, 365, 366)), 454 ALIGNED_WEEK_OF_YEAR("AlignedWeekOfYear", WEEKS, YEARS, ValueRange.of(1, 53)), 465 MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12), "month"), 520 YEAR_OF_ERA("YearOfEra", YEARS, FOREVER, ValueRange.of(1, Year.MAX_VALUE, Year.MAX_VALUE + 1)), 544 YEAR("Year", YEARS, FOREVER, ValueRange.of(Year.MIN_VALUE, Year.MAX_VALUE), "year"),
|
D | WeekFields.java | 77 import static java.time.temporal.ChronoUnit.YEARS; 694 return new ComputedDayOfField("WeekOfYear", weekDef, WEEKS, YEARS, WEEK_OF_YEAR_RANGE); in ofWeekOfYearField() 764 } else if (rangeUnit == YEARS) { // week-of-year in getFrom() 946 if (rangeUnit == YEARS) { // week-of-year in resolve() 1034 if (rangeUnit == YEARS) { // only have values for week-of-year in getDisplayName() 1078 } else if (rangeUnit == YEARS) { // week-of-year in isSupportedBy() 1095 } else if (rangeUnit == YEARS) { // week-of-year in rangeRefinedBy()
|
D | TemporalAdjusters.java | 69 import static java.time.temporal.ChronoUnit.YEARS; 270 return (temporal) -> temporal.with(DAY_OF_YEAR, 1).plus(1, YEARS); in firstDayOfNextYear()
|
D | ChronoUnit.java | 149 YEARS("Years", Duration.ofSeconds(31556952L)), enumConstant
|
D | IsoFields.java | 73 import static java.time.temporal.ChronoUnit.YEARS; 386 return YEARS; in getRangeUnit() 697 return (R) temporal.plus(amount / 256, YEARS) in addTo()
|
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestChronoUnit.java | 69 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/ |
D | TestReducedParser.java | 67 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/ |
D | TCKChronoUnit.java | 74 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()
|
D | TCKChronoField.java | 97 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/ |
D | TCKChronoUnitSerialization.java | 74 import static java.time.temporal.ChronoUnit.YEARS; 101 {YEARS}, in data_chronoUnit()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 66 import static java.time.temporal.ChronoUnit.YEARS; 150 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS)); 269 if (unit == ChronoUnit.YEARS) { in from() 427 if (unit == ChronoUnit.YEARS) { in get() 891 temporal = temporal.plus(years, YEARS); in addTo() 944 temporal = temporal.minus(years, YEARS); in subtractFrom()
|
D | Year.java | 71 import static java.time.temporal.ChronoUnit.YEARS; 398 … 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()
|
D | YearMonth.java | 74 import static java.time.temporal.ChronoUnit.YEARS; 386 …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/ |
D | Duration.java | 158 boolean yearSet = isSet(DatatypeConstants.YEARS); in getXMLSchemaType() 230 return getFieldValueAsInt(DatatypeConstants.YEARS); in getYears() 892 BigInteger years = (BigInteger) getField(DatatypeConstants.YEARS); in toString()
|
D | DatatypeConstants.java | 129 public static final Field YEARS = new Field("YEARS", 0); field in DatatypeConstants
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKChronoPeriod.java | 62 import static java.time.temporal.ChronoUnit.YEARS; 121 assertEquals(period.get(YEARS), 1); in test_get() 136 assertEquals(period.getUnits().get(0), YEARS); in test_getUnits()
|
/libcore/luni/src/test/java/libcore/java/time/ |
D | InstantTest.java | 46 assertEquals(false, Instant.EPOCH.isSupported(ChronoUnit.YEARS)); in test_isSupported_TemporalUnit()
|