/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 155 private final int years; field in Period 175 public static Period ofYears(int years) { in ofYears() argument 176 return create(years, 0, 0); in ofYears() 230 public static Period of(int years, int months, int days) { in of() argument 231 return create(years, months, days); in of() 264 int years = 0; in from() local 270 years = Math.toIntExact(unitAmount); in from() 279 return create(years, months, days); in from() 333 int years = parseNumber(text, yearMatch, negate); in parse() local 338 return create(years, months, days); in parse() [all …]
|
D | OffsetDateTime.java | 1210 public OffsetDateTime plusYears(long years) { in plusYears() argument 1211 return with(dateTime.plusYears(years), offset); in plusYears() 1399 public OffsetDateTime minusYears(long years) { in minusYears() argument 1400 … return (years == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-years)); in minusYears()
|
D | ZonedDateTime.java | 1623 public ZonedDateTime plusYears(long years) { in plusYears() argument 1624 return resolveLocal(dateTime.plusYears(years)); in plusYears() 1864 public ZonedDateTime minusYears(long years) { in minusYears() argument 1865 … return (years == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-years)); in minusYears()
|
D | LocalDateTime.java | 1214 public LocalDateTime plusYears(long years) { in plusYears() argument 1215 LocalDate newDate = date.plusYears(years); in plusYears() 1413 public LocalDateTime minusYears(long years) { in minusYears() argument 1414 … return (years == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1) : plusYears(-years)); in minusYears()
|
D | LocalDate.java | 1668 long years = totalMonths / 12; // safe in until() local 1670 return Period.of(Math.toIntExact(years), months, days); in until()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoPeriodImpl.java | 118 final int years; field in ChronoPeriodImpl 131 ChronoPeriodImpl(Chronology chrono, int years, int months, int days) { in ChronoPeriodImpl() argument 134 this.years = years; in ChronoPeriodImpl() 143 return years; in get() 166 return years == 0 && months == 0 && days == 0; in isZero() 171 return years < 0 || months < 0 || days < 0; in isNegative() 180 Math.addExact(years, amount.years), in plus() 190 Math.subtractExact(years, amount.years), in minus() 221 Math.multiplyExact(years, scalar), in multipliedBy() 231 long totalMonths = years * monthRange + months; in normalized() [all …]
|
D | HijrahDate.java | 520 HijrahDate plusYears(long years) { in plusYears() argument 521 if (years == 0) { in plusYears() 524 int newYear = Math.addExact(this.prolepticYear, (int)years); in plusYears() 600 long years = totalMonths / 12; // safe in until() local 602 return getChronology().period(Math.toIntExact(years), months, days); in until()
|
D | HijrahChronology.java | 903 Map<Integer, int[]> years = new HashMap<>(); in loadCalendarData() local 932 years.put(year, months); in loadCalendarData() 957 hijrahEpochMonthStartDays = createEpochMonths(minEpochDay, minYear, maxYear, years); in loadCalendarData() 985 …rivate int[] createEpochMonths(int epochDay, int minYear, int maxYear, Map<Integer, int[]> years) { in createEpochMonths() argument 997 int[] months = years.get(year);// must not be gaps in createEpochMonths()
|
D | Chronology.java | 704 default ChronoPeriod period(int years, int months, int days) { in period() argument 705 return new ChronoPeriodImpl(this, years, months, days); in period()
|
D | ThaiBuddhistDate.java | 366 ThaiBuddhistDate plusYears(long years) { in plusYears() argument 367 return with(isoDate.plusYears(years)); in plusYears()
|
D | MinguoDate.java | 366 MinguoDate plusYears(long years) { in plusYears() argument 367 return with(isoDate.plusYears(years)); in plusYears()
|
D | IsoChronology.java | 583 public Period period(int years, int months, int days) { in period() argument 584 return Period.of(years, months, days); in period()
|
D | JapaneseDate.java | 611 JapaneseDate plusYears(long years) { in plusYears() argument 612 return with(isoDate.plusYears(years)); in plusYears()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | CopticDate.java | 277 private CopticDate plusYears(long years) { in plusYears() argument 278 return plusMonths(Math.multiplyExact(years, 13)); in plusYears() 322 long years = totalMonths / 13; // safe in until() local 324 return Period.of(Math.toIntExact(years), months, days); in until()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | DatatypeFactory.java | 233 final BigInteger years, in newDuration() argument 270 final int years, in newDuration() argument 278 …BigInteger realYears = (years != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) ye… in newDuration()
|
D | Duration.java | 892 BigInteger years = (BigInteger) getField(DatatypeConstants.YEARS); in toString() local 893 if (years != null) { in toString() 894 buf.append(years).append('Y'); in toString()
|
/libcore/ojluni/annotations/hiddenapi/java/time/ |
D | OffsetDateTime.java | 281 public java.time.OffsetDateTime plusYears(long years) { in plusYears() argument 322 public java.time.OffsetDateTime minusYears(long years) { in minusYears() argument
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKYear.java | 548 long years = 20L + Year.MAX_VALUE; in test_plusYears_big() local 549 assertEquals(Year.of(-40).plusYears(years), Year.of((int) (-40L + years))); in test_plusYears_big() 680 long years = 20L + Year.MAX_VALUE; in test_minusYears_big() local 681 assertEquals(Year.of(40).minusYears(years), Year.of((int) (40L - years))); in test_minusYears_big()
|
D | TCKLocalDate.java | 1065 long years = 20L + Year.MAX_VALUE; 1066 LocalDate test = LocalDate.of(-40, 6, 1).plusYears(years); 1067 assertEquals(test, LocalDate.of((int) (-40L + years), 6, 1)); 1425 long years = 20L + Year.MAX_VALUE; 1426 LocalDate test = LocalDate.of(40, 6, 1).minusYears(years); 1427 assertEquals(test, LocalDate.of((int) (40L - years), 6, 1)); 1877 int years = Math.toIntExact((long) Year.MAX_VALUE - (long) Year.MIN_VALUE); 1878 assertEquals(LocalDate.MIN.until(LocalDate.MAX), Period.of(years, 11, 30));
|
/libcore/ojluni/src/main/resources/ |
D | hijrah-config-umalqura.properties | 47 # * Each line defines a year. The years must be in chronological
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestUmmAlQuraChronology.java | 325 …st_diffBetweenDates(ChronoLocalDate from, ChronoLocalDate to, long days, long months, long years) { in test_diffBetweenDates() argument 328 assertEquals(from.until(to, ChronoUnit.YEARS), years); in test_diffBetweenDates() local
|
/libcore/ |
D | LICENSE | 136 b) Accompany it with a written offer, valid for at least three years, to
|
/libcore/ojluni/ |
D | NOTICE | 422 b) Accompany it with a written offer, valid for at least three years, to
|