Home
last modified time | relevance | path

Searched refs:WEEKS (Results 1 – 25 of 29) sorted by relevance

12

/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java81 import static java.time.temporal.ChronoUnit.WEEKS;
345 DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7), "weekday"),
363 ALIGNED_DAY_OF_WEEK_IN_MONTH("AlignedDayOfWeekInMonth", DAYS, WEEKS, ValueRange.of(1, 7)),
381 ALIGNED_DAY_OF_WEEK_IN_YEAR("AlignedDayOfWeekInYear", DAYS, WEEKS, ValueRange.of(1, 7)),
438 ALIGNED_WEEK_OF_MONTH("AlignedWeekOfMonth", WEEKS, MONTHS, ValueRange.of(1, 4, 5)),
454 ALIGNED_WEEK_OF_YEAR("AlignedWeekOfYear", WEEKS, YEARS, ValueRange.of(1, 53)),
DWeekFields.java76 import static java.time.temporal.ChronoUnit.WEEKS;
676 return new ComputedDayOfField("DayOfWeek", weekDef, DAYS, WEEKS, DAY_OF_WEEK_RANGE); in ofDayOfWeekField()
685 … return new ComputedDayOfField("WeekOfMonth", weekDef, WEEKS, MONTHS, WEEK_OF_MONTH_RANGE); in ofWeekOfMonthField()
694 return new ComputedDayOfField("WeekOfYear", weekDef, WEEKS, YEARS, WEEK_OF_YEAR_RANGE); in ofWeekOfYearField()
703 …return new ComputedDayOfField("WeekOfWeekBasedYear", weekDef, WEEKS, IsoFields.WEEK_BASED_YEARS, W… in ofWeekOfWeekBasedYearField()
760 if (rangeUnit == WEEKS) { // day-of-week in getFrom()
922 if (rangeUnit == WEEKS) { // day-of-week in resolve()
1014 date = date.plus(weeks, WEEKS); in resolveWBY()
1074 if (rangeUnit == WEEKS) { // day-of-week in isSupportedBy()
1091 if (rangeUnit == ChronoUnit.WEEKS) { // day-of-week in rangeRefinedBy()
DChronoUnit.java132 WEEKS("Weeks", Duration.ofSeconds(7 * 86400L)), enumConstant
DIsoFields.java72 import static java.time.temporal.ChronoUnit.WEEKS;
431 return WEEKS; in getBaseUnit()
464 return (R) temporal.plus(Math.subtractExact(newValue, getFrom(temporal)), WEEKS); in adjustInto()
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DMockFieldNoValue.java63 import static java.time.temporal.ChronoUnit.WEEKS;
81 return WEEKS; in getBaseUnit()
DTestChronoUnit.java68 import static java.time.temporal.ChronoUnit.WEEKS;
249 assertEquals(WEEKS.between(start, end), expected); in test_weeksBetween()
254 assertEquals(WEEKS.between(end, start), -expected); in test_weeksBetweenReversed()
DTestIsoWeekFields.java66 assertEquals(weekField.getBaseUnit(), ChronoUnit.WEEKS); in test_WOWBY_basics()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKChronoUnit.java73 import static java.time.temporal.ChronoUnit.WEEKS;
108 {WEEKS, true, false, true}, in data_chronoUnit()
139 {WEEKS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2000, 1, 17)}, in data_unitAndTemporal()
154 {WEEKS, LocalTime.of(1, 2, 3, 400), false, 1, null}, in data_unitAndTemporal()
DTCKChronoField.java96 import static java.time.temporal.ChronoUnit.WEEKS;
128 {DAY_OF_WEEK, DAYS, WEEKS}, in data_fieldUnit()
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestChronoLocalDate.java92 dates.add(date.minus(1, ChronoUnit.WEEKS)); in test_date_comparator_checkGenerics_ISO()
96 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_date_comparator_checkGenerics_ISO()
116 dates.add(date.minus(1, ChronoUnit.WEEKS));
120 dates.add(date.plus(1, ChronoUnit.WEEKS));
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoUnitSerialization.java73 import static java.time.temporal.ChronoUnit.WEEKS;
103 {WEEKS}, in data_chronoUnit()
/libcore/ojluni/src/main/java/java/time/chrono/
DAbstractChronology.java79 import static java.time.temporal.ChronoUnit.WEEKS;
587 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS); in resolveYMAA()
622 return dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS); in resolveYAA()
650 ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS); in resolveAligned()
652 date = date.plus((dow - 1) / 7, WEEKS); in resolveAligned()
655 date = date.plus(Math.subtractExact(dow, 7) / 7, WEEKS); in resolveAligned()
DChronoLocalDateImpl.java203 case WEEKS: return plusDays(Math.multiplyExact(amountToAdd, 7)); in plus()
382 case WEEKS: return daysUntil(end) / 7; in until()
/libcore/luni/src/test/java/libcore/java/time/
DInstantTest.java44 assertEquals(false, Instant.EPOCH.isSupported(ChronoUnit.WEEKS)); in test_isSupported_TemporalUnit()
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKChronoLocalDate.java266 dates.add(date.minus(1, ChronoUnit.WEEKS)); in test_date_comparisons()
270 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_date_comparisons()
DTCKChronoLocalDateTime.java269 dates.add(date.minus(1, ChronoUnit.WEEKS)); in test_datetime_comparisons()
281 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_datetime_comparisons()
DTCKChronoZonedDateTime.java272 dates.add(date.minus(1, ChronoUnit.WEEKS)); in test_zonedDateTime_comparisons()
284 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_zonedDateTime_comparisons()
DCopticDate.java264 case WEEKS: return plusDays(Math.multiplyExact(amountToAdd, 7)); in plus()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalDate.java81 import static java.time.temporal.ChronoUnit.WEEKS;
656 assertEquals(TEST_2007_07_15.isSupported(ChronoUnit.WEEKS), true);
1688 {date(2000, 1, 1), date(2000, 1, 1), WEEKS, 0},
1699 {date(2000, 1, 15), date(2000, 2, 17), WEEKS, 4},
1700 {date(2000, 1, 15), date(2000, 2, 18), WEEKS, 4},
1701 {date(2000, 1, 15), date(2000, 2, 19), WEEKS, 5},
1702 {date(2000, 1, 15), date(2000, 2, 20), WEEKS, 5},
DTCKLocalDateTime.java102 import static java.time.temporal.ChronoUnit.WEEKS;
968 assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoUnit.WEEKS), true);
2765 {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), WEEKS, 0},
2776 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 17), WEEKS, 4},
2777 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 18), WEEKS, 4},
2778 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 19), WEEKS, 5},
2779 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 20), WEEKS, 5},
DTCKYear.java382 assertEquals(TEST_2008.isSupported(ChronoUnit.WEEKS), false); in test_isSupported_TemporalUnit()
594 {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, in data_plus_long_TemporalUnit()
726 {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, in data_minus_long_TemporalUnit()
DTCKYearMonth.java447 assertEquals(TEST_2008_06.isSupported(ChronoUnit.WEEKS), false); in test_isSupported_TemporalUnit()
770 {YearMonth.of(1, 1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, in data_plus_long_TemporalUnit()
985 {YearMonth.of(1, 1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, in data_minus_long_TemporalUnit()
DTCKLocalTime.java87 import static java.time.temporal.ChronoUnit.WEEKS;
610 assertEquals(TEST_12_30_40_987654321.isSupported(ChronoUnit.WEEKS), false); in test_isSupported_TemporalUnit()
1373 {LocalTime.of(1, 2, 3, 123_456_789), WEEKS}, in data_truncatedToInvalid()
DTCKInstant.java74 import static java.time.temporal.ChronoUnit.WEEKS;
653 {Instant.ofEpochSecond(1, 123_456_789), WEEKS},
/libcore/ojluni/src/main/java/java/time/
DLocalDate.java1233 case WEEKS: return plusWeeks(amountToAdd); in plus()
1600 case WEEKS: return daysUntil(end) / 7; in until()

12