/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
D | TestIsoWeekFields.java | 151 int dow = 1; in test_getFrom() local 155 assertEquals(DAY_OF_WEEK.getFrom(date), dow); in test_getFrom() local 156 if (dow == 7) { in test_getFrom() 157 dow = 1; in test_getFrom() 160 dow++; in test_getFrom() 179 int dow = 1; in test_adjustInto_dow() local 187 if (dow == 7) { in test_adjustInto_dow() 188 dow = 1; in test_adjustInto_dow() 191 dow++; in test_adjustInto_dow() 207 int dow = 1; in test_adjustInto_week() local [all …]
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | ZoneOffsetTransitionRule.java | 124 private final DayOfWeek dow; field in ZoneOffsetTransitionRule 230 this.dow = dayOfWeek; in ZoneOffsetTransitionRule() 314 final int dowByte = (dow == null ? 0 : dow.getValue()); in writeExternal() 350 DayOfWeek dow = dowByte == 0 ? null : DayOfWeek.of(dowByte); in readExternal() local 360 …return ZoneOffsetTransitionRule.of(month, dom, dow, time, timeByte == 24, defn, std, before, after… in readExternal() 413 return dow; in getDayOfWeek() 491 if (dow != null) { in createTransition() 492 date = date.with(previousOrSame(dow)); in createTransition() 496 if (dow != null) { in createTransition() 497 date = date.with(nextOrSame(dow)); in createTransition() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKTemporalAdjusters.java | 338 …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 …]
|
D | TCKWeekFields.java | 252 int dow = (7 + isoDOW.getValue() - firstDayOfWeek.getValue()) % 7 + 1; in test_weekOfWeekBasedYearField() local 254 int weekStart = Math.floorMod(1 - dow, 7); in test_weekOfWeekBasedYearField() 320 for (int dow = 1; dow <= 7; dow++) { in test_withDayOfWeek() 321 LocalDate result = day.with(dowField, dow); in test_withDayOfWeek() 322 … assertEquals(result.get(dowField), dow, String.format("Incorrect new Day of week: %s", result)); in test_withDayOfWeek() local 414 int dow = date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWom_lenient() local 416 String str = date.getYear() + ":" + date.getMonthValue() + ":" + j + ":" + dow; in test_parse_resolve_localizedWom_lenient() 483 int dow = date.get(dowField); in test_parse_resolve_localizedWomDow_lenient() local 485 String str = date.getYear() + ":" + date.getMonthValue() + ":" + j + ":" + dow; in test_parse_resolve_localizedWomDow_lenient() 527 int dow = date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWoy_lenient() local [all …]
|
D | TCKIsoFields.java | 324 public void test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WOWBY() argument 325 assertEquals(date.getDayOfWeek(), dow); in test_WOWBY() local 339 public void test_WBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WBY() argument 340 assertEquals(date.getDayOfWeek(), dow); in test_WBY() local 354 public void test_parse_weeks_STRICT(LocalDate date, DayOfWeek dow, int week, int wby) { in test_parse_weeks_STRICT() argument 360 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_STRICT() 365 public void test_parse_weeks_SMART(LocalDate date, DayOfWeek dow, int week, int wby) { in test_parse_weeks_SMART() argument 371 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_SMART() 376 public void test_parse_weeks_LENIENT(LocalDate date, DayOfWeek dow, int week, int wby) { in test_parse_weeks_LENIENT() argument 382 LocalDate parsed = LocalDate.parse(wby + "-" + week + "-" + dow.getValue(), f); in test_parse_weeks_LENIENT()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | IsoFields.java | 501 long dow = dowLong; // unvalidated in resolve() local 502 if (dow > 7) { in resolve() 503 date = date.plusWeeks((dow - 1) / 7); in resolve() 504 dow = ((dow - 1) % 7) + 1; in resolve() 505 } else if (dow < 1) { in resolve() 506 date = date.plusWeeks(Math.subtractExact(dow, 7) / 7); in resolve() 507 dow = ((dow + 6) % 7) + 1; in resolve() 509 date = date.plusWeeks(Math.subtractExact(wowby, 1)).with(DAY_OF_WEEK, dow); in resolve() 511 int dow = DAY_OF_WEEK.checkValidIntValue(dowLong); // validated in resolve() local 519 date = date.plusWeeks(wowby - 1).with(DAY_OF_WEEK, dow); in resolve() [all …]
|
D | WeekFields.java | 310 DayOfWeek dow = DayOfWeek.SUNDAY.plus(calDow - 1); in of() local 314 return WeekFields.of(dow, minDays); in of() 750 int yowby, int wowby, int dow) { in ofWeekBasedYear() argument 760 int days = -offset + (dow - 1) + (wowby - 1) * 7; in ofWeekBasedYear() 812 int dow = localizedDayOfWeek(temporal); in localizedWeekOfMonth() local 814 int offset = startOfWeekOffset(dom, dow); in localizedWeekOfMonth() 819 int dow = localizedDayOfWeek(temporal); in localizedWeekOfYear() local 821 int offset = startOfWeekOffset(doy, dow); in localizedWeekOfYear() 832 int dow = localizedDayOfWeek(temporal); in localizedWeekBasedYear() local 835 int offset = startOfWeekOffset(doy, dow); in localizedWeekBasedYear() [all …]
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | AbstractChronology.java | 574 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYMAD() local 575 return resolveAligned(date(y, 1, 1), months, weeks, dow); in resolveYMAD() 579 … int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK); in resolveYMAD() local 580 …hronoLocalDate date = date(y, moy, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow))); in resolveYMAD() 607 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYAD() local 608 return resolveAligned(dateYearDay(y, 1), 0, weeks, dow); in resolveYAD() 611 … int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK); in resolveYAD() local 612 …onoLocalDate date = dateYearDay(y, 1).plus((aw - 1) * 7, DAYS).with(nextOrSame(DayOfWeek.of(dow))); in resolveYAD() 619 ChronoLocalDate resolveAligned(ChronoLocalDate base, long months, long weeks, long dow) { in resolveAligned() argument 621 if (dow > 7) { in resolveAligned() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestExampleCode.java | 91 int dow = now1.get(ChronoField.DAY_OF_WEEK); in test_chronoPackageExample() local 95 dow, day, month, year); in test_chronoPackageExample() 151 int dow = now1.get(ChronoField.DAY_OF_WEEK); in test_calendarPackageExample() local 155 dow, day, month, year); in test_calendarPackageExample()
|
D | TestIsoChronoImpl.java | 145 int dow = isoDate.get(weekDef.dayOfWeek()); in test_DayOfWeek_IsoChronology_vsCalendar() local 146 assertEquals(jdow, dow, "Calendar DayOfWeek does not match ISO DayOfWeek"); in test_DayOfWeek_IsoChronology_vsCalendar()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatter.java | 1270 Map<Long, String> dow = new HashMap<>(); 1271 dow.put(1L, "Mon"); 1272 dow.put(2L, "Tue"); 1273 dow.put(3L, "Wed"); 1274 dow.put(4L, "Thu"); 1275 dow.put(5L, "Fri"); 1276 dow.put(6L, "Sat"); 1277 dow.put(7L, "Sun"); 1295 .appendText(DAY_OF_WEEK, dow)
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | BaseCalendar.java | 204 int dow = bdate.getDayOfWeek(); in validate() local 205 if (dow != Date.FIELD_UNDEFINED && dow != getDayOfWeek(bdate)) { in validate()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | TimeZoneTest.java | 244 @Override public void setStartRule(int m, int d, int dow, int time) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument 247 @Override public void setStartRule(int m, int d, int dow, int time, boolean after) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument 250 @Override public void setEndRule(int m, int d, int dow, int time) { in testSimpleTimeZoneDoesNotCallOverrideableMethodsFromConstructor() argument 253 @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/format/ |
D | TestUnicodeExtension.java | 892 DayOfWeek dow = WeekFields.of(locale).getFirstDayOfWeek(); in test_firstDayOfWeek() local 893 assertEquals(dow, dowExpected); in test_firstDayOfWeek()
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 1358 int dow = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek(); in roll() local 1359 if (dow < 0) { in roll() 1360 dow += 7; in roll() 1388 long nfd = monthDay1st + value * 7 + dow; in roll() 1868 int dow = date.getDayOfWeek(); in getActualMaximum() local 1884 int x = dow - dow1; in getActualMaximum()
|
D | JapaneseImperialCalendar.java | 830 int dow = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek(); in roll() local 831 if (dow < 0) { in roll() 832 dow += 7; in roll() 860 long nfd = monthDay1st + value * 7 + dow; in roll() 1432 int dow = date.getDayOfWeek(); 1438 int x = dow - dow1;
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | CalendarTest.java | 67 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/ |
D | TCKLocalDate.java | 807 DayOfWeek dow = DayOfWeek.MONDAY; 812 assertSame(d.getDayOfWeek(), dow); 813 dow = dow.plus(1);
|
D | TCKLocalDateTime.java | 1111 DayOfWeek dow = DayOfWeek.MONDAY; 1117 assertSame(d.getDayOfWeek(), dow); 1118 dow = dow.plus(1);
|