Home
last modified time | relevance | path

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

12

/libcore/ojluni/src/main/java/java/time/temporal/
DChronoField.java81 import static java.time.temporal.ChronoUnit.WEEKS;
365 DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7), "weekday"),
383 ALIGNED_DAY_OF_WEEK_IN_MONTH("AlignedDayOfWeekInMonth", DAYS, WEEKS, ValueRange.of(1, 7)),
401 ALIGNED_DAY_OF_WEEK_IN_YEAR("AlignedDayOfWeekInYear", DAYS, WEEKS, ValueRange.of(1, 7)),
461 ALIGNED_WEEK_OF_MONTH("AlignedWeekOfMonth", WEEKS, MONTHS, ValueRange.of(1, 4, 5)),
477 ALIGNED_WEEK_OF_YEAR("AlignedWeekOfYear", WEEKS, YEARS, ValueRange.of(1, 53)),
DWeekFields.java76 import static java.time.temporal.ChronoUnit.WEEKS;
701 return new ComputedDayOfField("DayOfWeek", weekDef, DAYS, WEEKS, DAY_OF_WEEK_RANGE); in ofDayOfWeekField()
710 … return new ComputedDayOfField("WeekOfMonth", weekDef, WEEKS, MONTHS, WEEK_OF_MONTH_RANGE); in ofWeekOfMonthField()
719 return new ComputedDayOfField("WeekOfYear", weekDef, WEEKS, YEARS, WEEK_OF_YEAR_RANGE); in ofWeekOfYearField()
728 …return new ComputedDayOfField("WeekOfWeekBasedYear", weekDef, WEEKS, IsoFields.WEEK_BASED_YEARS, W… in ofWeekOfWeekBasedYearField()
785 if (rangeUnit == WEEKS) { // day-of-week in getFrom()
947 if (rangeUnit == WEEKS) { // day-of-week in resolve()
1039 date = date.plus(weeks, WEEKS); in resolveWBY()
1106 if (rangeUnit == WEEKS) { // day-of-week in isSupportedBy()
1123 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;
453 return WEEKS; in getBaseUnit()
486 return (R) temporal.plus(Math.subtractExact(newValue, getFrom(temporal)), WEEKS); in adjustInto()
/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/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.java68 assertEquals(weekField.getBaseUnit(), ChronoUnit.WEEKS); in test_WOWBY_basics()
/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;
557 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS); in resolveYMAA()
592 return dateYearDay(y, 1).plus(weeks, WEEKS).plus(days, DAYS); in resolveYAA()
620 ChronoLocalDate date = base.plus(months, MONTHS).plus(weeks, WEEKS); in resolveAligned()
622 date = date.plus((dow - 1) / 7, WEEKS); in resolveAligned()
625 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.java265 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;
701 assertEquals(TEST_2007_07_15.isSupported(ChronoUnit.WEEKS), true);
1757 {date(2000, 1, 1), date(2000, 1, 1), WEEKS, 0},
1768 {date(2000, 1, 15), date(2000, 2, 17), WEEKS, 4},
1769 {date(2000, 1, 15), date(2000, 2, 18), WEEKS, 4},
1770 {date(2000, 1, 15), date(2000, 2, 19), WEEKS, 5},
1771 {date(2000, 1, 15), date(2000, 2, 20), WEEKS, 5},
DTCKLocalDateTime.java102 import static java.time.temporal.ChronoUnit.WEEKS;
962 assertEquals(TEST_2007_07_15_12_30_40_987654321.isSupported(ChronoUnit.WEEKS), true);
2759 {dtNoon(2000, 1, 1), dtNoon(2000, 1, 1), WEEKS, 0},
2770 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 17), WEEKS, 4},
2771 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 18), WEEKS, 4},
2772 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 19), WEEKS, 5},
2773 {dtNoon(2000, 1, 15), dtNoon(2000, 2, 20), WEEKS, 5},
DTCKYear.java406 assertEquals(TEST_2008.isSupported(ChronoUnit.WEEKS), false); in test_isSupported_TemporalUnit()
618 {Year.of(1), 0, ChronoUnit.WEEKS, null, DateTimeException.class}, in data_plus_long_TemporalUnit()
750 {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()
DTCKDuration.java71 import static java.time.temporal.ChronoUnit.WEEKS;
422 Duration.of(2, WEEKS); in factory_of_longTemporalUnit_estimatedUnit()
2406 {Duration.ofSeconds(1, 123_456_789), WEEKS}, in data_truncatedToInvalid()
DTCKInstant.java74 import static java.time.temporal.ChronoUnit.WEEKS;
659 {Instant.ofEpochSecond(1, 123_456_789), WEEKS},
/libcore/ojluni/src/main/java/java/time/
DLocalDate.java1259 case WEEKS: return plusWeeks(amountToAdd); in plus()
1642 case WEEKS: return daysUntil(end) / 7; in until()

12