/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestLocalDate.java | 211 for (int weeks = 0; weeks < 365 * 8; weeks++) { in test_plusWeeks_symmetry() 212 LocalDate t = reference.plusWeeks(weeks).plusWeeks(-weeks); in test_plusWeeks_symmetry() 215 t = reference.plusWeeks(-weeks).plusWeeks(weeks); in test_plusWeeks_symmetry() 339 for (int weeks = 0; weeks < 365 * 8; weeks++) { in test_minusWeeks_symmetry() 340 LocalDate t = reference.minusWeeks(weeks).minusWeeks(-weeks); in test_minusWeeks_symmetry() 343 t = reference.minusWeeks(-weeks).minusWeeks(weeks); in test_minusWeeks_symmetry()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | AbstractChronology.java | 585 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1); in resolveYMAA() local 587 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS); in resolveYMAA() 603 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1); in resolveYMAD() local 605 return resolveAligned(date(y, 1, 1), months, weeks, dow); in resolveYMAD() 620 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1); in resolveYAA() local 622 return dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS); in resolveYAA() 636 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1); in resolveYAD() local 638 return resolveAligned(dateYearDay(y, 1), 0, weeks, dow); in resolveYAD() 649 ChronoLocalDate resolveAligned(ChronoLocalDate base, long months, long weeks, long dow) { in resolveAligned() argument 650 ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS); in resolveAligned()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | WeekFields.java | 962 long weeks = Math.subtractExact(wom, localizedWeekOfMonth(date)); in resolveWoM() local 964 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoM() 969 int weeks = (int) (womInt - localizedWeekOfMonth(date)); // safe from overflow in resolveWoM() local 971 date = date.plus(weeks * 7 + days, DAYS); in resolveWoM() 987 long weeks = Math.subtractExact(woy, localizedWeekOfYear(date)); in resolveWoY() local 989 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoY() 992 int weeks = (int) (womInt - localizedWeekOfYear(date)); // safe from overflow in resolveWoY() local 994 date = date.plus(weeks * 7 + days, DAYS); in resolveWoY() 1013 long weeks = Math.subtractExact(wowby, 1); in resolveWBY() local 1014 date = date.plus(weeks, WEEKS); in resolveWBY()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 202 public static Period ofWeeks(int weeks) { in ofWeeks() argument 203 return create(0, 0, Math.multiplyExact(weeks, 7)); in ofWeeks() 335 int weeks = parseNumber(text, weekMatch, negate); in parse() local 337 days = Math.addExact(days, Math.multiplyExact(weeks, 7)); in parse()
|
D | OffsetDateTime.java | 1253 public OffsetDateTime plusWeeks(long weeks) { in plusWeeks() argument 1254 return with(dateTime.plusWeeks(weeks), offset); in plusWeeks() 1442 public OffsetDateTime minusWeeks(long weeks) { in minusWeeks() argument 1443 … return (weeks == Long.MIN_VALUE ? plusWeeks(Long.MAX_VALUE).plusWeeks(1) : plusWeeks(-weeks)); in minusWeeks()
|
D | ZonedDateTime.java | 1667 public ZonedDateTime plusWeeks(long weeks) { in plusWeeks() argument 1668 return resolveLocal(dateTime.plusWeeks(weeks)); in plusWeeks() 1908 public ZonedDateTime minusWeeks(long weeks) { in minusWeeks() argument 1909 … return (weeks == Long.MIN_VALUE ? plusWeeks(Long.MAX_VALUE).plusWeeks(1) : plusWeeks(-weeks)); in minusWeeks()
|
D | LocalDateTime.java | 1259 public LocalDateTime plusWeeks(long weeks) { in plusWeeks() argument 1260 LocalDate newDate = date.plusWeeks(weeks); in plusWeeks() 1456 public LocalDateTime minusWeeks(long weeks) { in minusWeeks() argument 1457 … return (weeks == Long.MIN_VALUE ? plusWeeks(Long.MAX_VALUE).plusWeeks(1) : plusWeeks(-weeks)); in minusWeeks()
|
/libcore/ojluni/annotations/hiddenapi/java/time/ |
D | OffsetDateTime.java | 289 public java.time.OffsetDateTime plusWeeks(long weeks) { in plusWeeks() argument 330 public java.time.OffsetDateTime minusWeeks(long weeks) { in minusWeeks() argument
|
/libcore/ojluni/src/test/java/time/tck/java/time/ |
D | TCKLocalDateTime.java | 1563 for (int weeks = 0; weeks < 365 * 8; weeks++) { 1564 LocalDateTime t = reference.plusWeeks(weeks).plusWeeks(-weeks); 1567 t = reference.plusWeeks(-weeks).plusWeeks(weeks); 2252 for (int weeks = 0; weeks < 365 * 8; weeks++) { 2253 LocalDateTime t = reference.minusWeeks(weeks).minusWeeks(-weeks); 2256 t = reference.minusWeeks(-weeks).minusWeeks(weeks);
|