Home
last modified time | relevance | path

Searched refs:dow (Results 1 – 16 of 16) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestIsoWeekFields.java141 int dow = 1; in test_getFrom() local
145 assertEquals(DAY_OF_WEEK.getFrom(date), dow); in test_getFrom() local
146 if (dow == 7) { in test_getFrom()
147 dow = 1; in test_getFrom()
150 dow++; in test_getFrom()
169 int dow = 1; in test_adjustInto_dow() local
177 if (dow == 7) { in test_adjustInto_dow()
178 dow = 1; in test_adjustInto_dow()
181 dow++; in test_adjustInto_dow()
197 int dow = 1; in test_adjustInto_week() local
[all …]
/libcore/ojluni/src/main/java/java/time/zone/
DZoneOffsetTransitionRule.java124 private final DayOfWeek dow; field in ZoneOffsetTransitionRule
225 this.dow = dayOfWeek; in ZoneOffsetTransitionRule()
309 final int dowByte = (dow == null ? 0 : dow.getValue()); in writeExternal()
345 DayOfWeek dow = dowByte == 0 ? null : DayOfWeek.of(dowByte); in readExternal() local
355 …return ZoneOffsetTransitionRule.of(month, dom, dow, time, timeByte == 24, defn, std, before, after… in readExternal()
408 return dow; in getDayOfWeek()
486 if (dow != null) { in createTransition()
487 date = date.with(previousOrSame(dow)); in createTransition()
491 if (dow != null) { in createTransition()
492 date = date.with(nextOrSame(dow)); in createTransition()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKTemporalAdjusters.java338 …public void test_dayOfWeekInMonth_positive(int year, int month, DayOfWeek dow, LocalDate expected)… in test_dayOfWeekInMonth_positive() argument
342 … LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(ordinal, dow).adjustInto(date); in test_dayOfWeekInMonth_positive()
367 public void test_dayOfWeekInMonth_zero(int year, int month, DayOfWeek dow, LocalDate expected) { in test_dayOfWeekInMonth_zero() argument
370 … LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(0, dow).adjustInto(date); in test_dayOfWeekInMonth_zero()
394 …public void test_dayOfWeekInMonth_negative(int year, int month, DayOfWeek dow, LocalDate expected)… in test_dayOfWeekInMonth_negative() argument
398 …LocalDate test = (LocalDate) TemporalAdjusters.dayOfWeekInMonth(-1 - ordinal, dow).adjustInto(date… in test_dayOfWeekInMonth_negative()
418 public void test_firstInMonth(int year, int month, DayOfWeek dow, LocalDate expected) { in test_firstInMonth() argument
421 LocalDate test = (LocalDate) TemporalAdjusters.firstInMonth(dow).adjustInto(date); in test_firstInMonth()
440 public void test_lastInMonth(int year, int month, DayOfWeek dow, LocalDate expected) { in test_lastInMonth() argument
443 LocalDate test = (LocalDate) TemporalAdjusters.lastInMonth(dow).adjustInto(date); in test_lastInMonth()
[all …]
DTCKWeekFields.java250 int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1; in test_weekOfWeekBasedYearField() local
252 int weekStart = Math.floorMod(1 - dow, 7); in test_weekOfWeekBasedYearField()
318 for (int dow = 1; dow <= 7; dow++) { in test_withDayOfWeek()
319 LocalDate result = day.with(dowField, dow); in test_withDayOfWeek()
320 … assertEquals(result.get(dowField), dow, String.format("Incorrect new Day of week: %s", result)); in test_withDayOfWeek() local
412 int dow = date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWom_lenient() local
414 String str = date.getYear() + ":" + date.getMonthValue() + ":" + j + ":" + dow; in test_parse_resolve_localizedWom_lenient()
481 int dow = date.get(dowField); in test_parse_resolve_localizedWomDow_lenient() local
483 String str = date.getYear() + ":" + date.getMonthValue() + ":" + j + ":" + dow; in test_parse_resolve_localizedWomDow_lenient()
525 int dow = date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWoy_lenient() local
[all …]
DTCKIsoFields.java321 public void test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WOWBY() argument
322 assertEquals(date.getDayOfWeek(), dow); in test_WOWBY() local
336 public void test_WBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WBY() argument
337 assertEquals(date.getDayOfWeek(), dow); in test_WBY() local
351 public void test_parse_weeks_STRICT(LocalDate date, DayOfWeek dow, int week, int wby) { in test_parse_weeks_STRICT() argument
357 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_STRICT()
362 public void test_parse_weeks_SMART(LocalDate date, DayOfWeek dow, int week, int wby) { in test_parse_weeks_SMART() argument
368 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_SMART()
373 public void test_parse_weeks_LENIENT(LocalDate date, DayOfWeek dow, int week, int wby) { in test_parse_weeks_LENIENT() argument
379 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_LENIENT()
/libcore/ojluni/src/main/java/java/time/temporal/
DIsoFields.java479 long dow = dowLong; // unvalidated in resolve() local
480 if (dow > 7) { in resolve()
481 date = date.plusWeeks((dow - 1) / 7); in resolve()
482 dow = ((dow - 1) % 7) + 1; in resolve()
483 } else if (dow < 1) { in resolve()
484 date = date.plusWeeks(Math.subtractExact(dow, 7) / 7); in resolve()
485 dow = ((dow + 6) % 7) + 1; in resolve()
487 date = date.plusWeeks(Math.subtractExact(wowby, 1)).with(DAY_OF_WEEK, dow); in resolve()
489 int dow = DAY_OF_WEEK.checkValidIntValue(dowLong); // validated in resolve() local
497 date = date.plusWeeks(wowby - 1).with(DAY_OF_WEEK, dow); in resolve()
[all …]
DWeekFields.java290 DayOfWeek dow = DayOfWeek.SUNDAY.plus(weekData.firstDayOfWeek - 1); in of() local
291 return WeekFields.of(dow, weekData.minimalDaysInFirstWeek); in of()
724 int yowby, int wowby, int dow) { in ofWeekBasedYear() argument
734 int days = -offset + (dow - 1) + (wowby - 1) * 7; in ofWeekBasedYear()
786 int dow = localizedDayOfWeek(temporal); in localizedWeekOfMonth() local
788 int offset = startOfWeekOffset(dom, dow); in localizedWeekOfMonth()
793 int dow = localizedDayOfWeek(temporal); in localizedWeekOfYear() local
795 int offset = startOfWeekOffset(doy, dow); in localizedWeekOfYear()
806 int dow = localizedDayOfWeek(temporal); in localizedWeekBasedYear() local
809 int offset = startOfWeekOffset(doy, dow); in localizedWeekBasedYear()
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DAbstractChronology.java604 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYMAD() local
605 return resolveAligned(date(y, 1, 1), months, weeks, dow); in resolveYMAD()
609 … int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK); in resolveYMAD() local
610 …hronoLocalDate date = date(y, moy, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow))); in resolveYMAD()
637 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYAD() local
638 return resolveAligned(dateYearDay(y, 1), 0, weeks, dow); in resolveYAD()
641 … int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK); in resolveYAD() local
642 …onoLocalDate date = dateYearDay(y, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow))); in resolveYAD()
649 ChronoLocalDate resolveAligned(ChronoLocalDate base, long months, long weeks, long dow) { in resolveAligned() argument
651 if (dow > 7) { in resolveAligned()
[all …]
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatter.java1221 Map<Long, String> dow = new HashMap<>();
1222 dow.put(1L, "Mon");
1223 dow.put(2L, "Tue");
1224 dow.put(3L, "Wed");
1225 dow.put(4L, "Thu");
1226 dow.put(5L, "Fri");
1227 dow.put(6L, "Sat");
1228 dow.put(7L, "Sun");
1246 .appendText(DAY_OF_WEEK, dow)
/libcore/luni/src/test/java/libcore/java/util/
DTimeZoneTest.java232 @Override public void setStartRule(int m, int d, int dow, int time) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument
235 @Override public void setStartRule(int m, int d, int dow, int time, boolean after) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument
238 @Override public void setEndRule(int m, int d, int dow, int time) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument
241 @Override public void setEndRule(int m, int d, int dow, int time, boolean after) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestIsoChronoImpl.java142 int dow = isoDate.get(weekDef.dayOfWeek()); in test_DayOfWeek_IsoChronology_vsCalendar() local
143 assertEquals(jdow, dow, "Calendar DayOfWeek does not match ISO DayOfWeek"); in test_DayOfWeek_IsoChronology_vsCalendar()
/libcore/ojluni/src/main/java/java/util/
DJapaneseImperialCalendar.java826 int dow = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek(); in roll() local
827 if (dow < 0) { in roll()
828 dow += 7; in roll()
856 long nfd = monthDay1st + value * 7 + dow; in roll()
1461 int dow = date.getDayOfWeek(); in getActualMaximum()
1467 int x = dow - dow1; in getActualMaximum()
DGregorianCalendar.java1361 int dow = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek(); in roll() local
1362 if (dow < 0) { in roll()
1363 dow += 7; in roll()
1391 long nfd = monthDay1st + value * 7 + dow; in roll()
1901 int dow = date.getDayOfWeek(); in getActualMaximum() local
1917 int x = dow - dow1; in getActualMaximum()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DCalendarTest.java67 int dow = cal.get(Calendar.DAY_OF_WEEK); in test_setII() local
70 + " expected: " + dow, cal.get(Calendar.DAY_OF_WEEK) != dow); in test_setII()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKLocalDate.java762 DayOfWeek dow = DayOfWeek.MONDAY;
767 assertSame(d.getDayOfWeek(), dow);
768 dow = dow.plus(1);
DTCKLocalDateTime.java1117 DayOfWeek dow = DayOfWeek.MONDAY;
1123 assertSame(d.getDayOfWeek(), dow);
1124 dow = dow.plus(1);