/libcore/ojluni/src/main/java/java/text/ |
D | CalendarBuilder.java | 128 int dayOfWeek = isSet(DAY_OF_WEEK) ? in establish() local 130 if (!isValidDayOfWeek(dayOfWeek) && cal.isLenient()) { in establish() 131 if (dayOfWeek >= 8) { in establish() 132 dayOfWeek--; in establish() 133 weekOfYear += dayOfWeek / 7; in establish() 134 dayOfWeek = (dayOfWeek % 7) + 1; in establish() 136 while (dayOfWeek <= 0) { in establish() 137 dayOfWeek += 7; in establish() 141 dayOfWeek = toCalendarDayOfWeek(dayOfWeek); in establish() 143 cal.setWeekDate(field[MAX_FIELD + WEEK_YEAR], weekOfYear, dayOfWeek); in establish() [all …]
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | TemporalAdjusters.java | 290 public static TemporalAdjuster firstInMonth(DayOfWeek dayOfWeek) { in firstInMonth() argument 291 return TemporalAdjusters.dayOfWeekInMonth(1, dayOfWeek); in firstInMonth() 310 public static TemporalAdjuster lastInMonth(DayOfWeek dayOfWeek) { in lastInMonth() argument 311 return TemporalAdjusters.dayOfWeekInMonth(-1, dayOfWeek); in lastInMonth() 346 public static TemporalAdjuster dayOfWeekInMonth(int ordinal, DayOfWeek dayOfWeek) { in dayOfWeekInMonth() argument 347 Objects.requireNonNull(dayOfWeek, "dayOfWeek"); in dayOfWeekInMonth() 348 int dowValue = dayOfWeek.getValue(); in dayOfWeekInMonth() 386 public static TemporalAdjuster next(DayOfWeek dayOfWeek) { 387 int dowValue = dayOfWeek.getValue(); 412 public static TemporalAdjuster nextOrSame(DayOfWeek dayOfWeek) { [all …]
|
D | WeekFields.java | 250 private final transient TemporalField dayOfWeek = ComputedDayOfField.ofDayOfWeekField(this); field in WeekFields 428 public TemporalField dayOfWeek() { in dayOfWeek() method in WeekFields 429 return dayOfWeek; in dayOfWeek() 905 int idow = temporal.get(weekDef.dayOfWeek); in adjustInto()
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | AbstractCalendar.java | 279 public CalendarDate getNthDayOfWeek(int nth, int dayOfWeek, CalendarDate date) { in getNthDayOfWeek() argument 285 nfd = 7 * nth + getDayOfWeekDateBefore(fd, dayOfWeek); in getNthDayOfWeek() 287 nfd = 7 * nth + getDayOfWeekDateAfter(fd, dayOfWeek); in getNthDayOfWeek() 301 static long getDayOfWeekDateBefore(long fixedDate, int dayOfWeek) { in getDayOfWeekDateBefore() argument 302 return getDayOfWeekDateOnOrBefore(fixedDate - 1, dayOfWeek); in getDayOfWeekDateBefore() 313 static long getDayOfWeekDateAfter(long fixedDate, int dayOfWeek) { in getDayOfWeekDateAfter() argument 314 return getDayOfWeekDateOnOrBefore(fixedDate + 7, dayOfWeek); in getDayOfWeekDateAfter() 326 public static long getDayOfWeekDateOnOrBefore(long fixedDate, int dayOfWeek) { in getDayOfWeekDateOnOrBefore() argument 327 long fd = fixedDate - (dayOfWeek - 1); in getDayOfWeekDateOnOrBefore()
|
D | CalendarDate.java | 71 private int dayOfWeek = FIELD_UNDEFINED; field in CalendarDate 213 dayOfWeek = FIELD_UNDEFINED; in getDayOfWeek() 215 return dayOfWeek; in getDayOfWeek() 482 protected void setDayOfWeek(int dayOfWeek) { in setDayOfWeek() argument 483 this.dayOfWeek = dayOfWeek; in setDayOfWeek()
|
D | JulianCalendar.java | 206 int dayOfWeek = getDayOfWeekFromFixedDate(fixedDate); in getCalendarDateFromFixedDate() local 207 assert dayOfWeek > 0 : "negative day of week " + dayOfWeek; in getCalendarDateFromFixedDate() 211 jdate.setDayOfWeek(dayOfWeek); in getCalendarDateFromFixedDate()
|
D | BaseCalendar.java | 458 int dayOfWeek = getDayOfWeekFromFixedDate(fixedDate); in getCalendarDateFromFixedDate() local 459 assert dayOfWeek > 0 : "negative day of week " + dayOfWeek; in getCalendarDateFromFixedDate() 463 gdate.setDayOfWeek(dayOfWeek); in getCalendarDateFromFixedDate()
|
D | CalendarSystem.java | 345 public abstract CalendarDate getNthDayOfWeek(int nth, int dayOfWeek, in getNthDayOfWeek() argument
|
D | ImmutableGregorianDate.java | 223 protected void setDayOfWeek(int dayOfWeek) { in setDayOfWeek() argument
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKWeekFields.java | 106 assertEquals(week.dayOfWeek().isDateBased(), true); in test_basics() 107 assertEquals(week.dayOfWeek().isTimeBased(), false); in test_basics() 126 assertEquals(date.get(WeekFields.ISO.dayOfWeek()), 1); in test_dayOfWeekField_simpleGet() 127 assertEquals(date.get(WeekFields.of(DayOfWeek.MONDAY, 1).dayOfWeek()), 1); in test_dayOfWeekField_simpleGet() 128 assertEquals(date.get(WeekFields.of(DayOfWeek.MONDAY, 7).dayOfWeek()), 1); in test_dayOfWeekField_simpleGet() 129 assertEquals(date.get(WeekFields.SUNDAY_START.dayOfWeek()), 2); in test_dayOfWeekField_simpleGet() 130 assertEquals(date.get(WeekFields.of(DayOfWeek.SUNDAY, 1).dayOfWeek()), 2); in test_dayOfWeekField_simpleGet() 131 assertEquals(date.get(WeekFields.of(DayOfWeek.SUNDAY, 7).dayOfWeek()), 2); in test_dayOfWeekField_simpleGet() 132 assertEquals(date.get(WeekFields.of(DayOfWeek.SATURDAY, 1).dayOfWeek()), 3); in test_dayOfWeekField_simpleGet() 133 assertEquals(date.get(WeekFields.of(DayOfWeek.FRIDAY, 1).dayOfWeek()), 4); in test_dayOfWeekField_simpleGet() [all …]
|
/libcore/ojluni/src/main/java/java/time/ |
D | DayOfWeek.java | 163 public static DayOfWeek of(int dayOfWeek) { in of() argument 164 if (dayOfWeek < 1 || dayOfWeek > 7) { in of() 165 throw new DateTimeException("Invalid value for DayOfWeek: " + dayOfWeek); in of() 167 return ENUMS[dayOfWeek - 1]; in of()
|
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/ |
D | AbstractCalendar.java | 95 int nth, int dayOfWeek, sun.util.calendar.CalendarDate date) { in getNthDayOfWeek() argument 99 static long getDayOfWeekDateBefore(long fixedDate, int dayOfWeek) { in getDayOfWeekDateBefore() argument 103 static long getDayOfWeekDateAfter(long fixedDate, int dayOfWeek) { in getDayOfWeekDateAfter() argument 108 public static long getDayOfWeekDateOnOrBefore(long fixedDate, int dayOfWeek) { in getDayOfWeekDateOnOrBefore() argument
|
D | CalendarDate.java | 228 protected void setDayOfWeek(int dayOfWeek) { in setDayOfWeek() argument 258 private int dayOfWeek = -2147483648; // 0x80000000 field in CalendarDate
|
D | CalendarSystem.java | 86 int nth, int dayOfWeek, sun.util.calendar.CalendarDate date); in getNthDayOfWeek() argument
|
D | ImmutableGregorianDate.java | 213 protected void setDayOfWeek(int dayOfWeek) { in setDayOfWeek() argument
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 1830 int dayOfWeek = cal.getDayOfWeek(d); in getActualMaximum() local 1832 dayOfWeek -= getFirstDayOfWeek(); in getActualMaximum() 1833 if (dayOfWeek < 0) { in getActualMaximum() 1834 dayOfWeek += 7; in getActualMaximum() 1837 int magic = dayOfWeek + getMinimalDaysInFirstWeek() - 1; in getActualMaximum() 1863 int dayOfWeek = cal.getDayOfWeek(d); in getActualMaximum() local 1865 dayOfWeek -= getFirstDayOfWeek(); in getActualMaximum() 1866 if (dayOfWeek < 0) { in getActualMaximum() 1867 dayOfWeek += 7; in getActualMaximum() 1869 int nDaysFirstWeek = 7 - dayOfWeek; // # of days in the first week in getActualMaximum() [all …]
|
D | SimpleTimeZone.java | 604 public int getOffset(int era, int year, int month, int day, int dayOfWeek, in getOffset() argument 660 || (dayOfWeek < Calendar.SUNDAY || dayOfWeek > Calendar.SATURDAY) in getOffset() 747 int dayOfWeek, int timeOfDay) { in getTransition() argument 760 cdate = (BaseCalendar.Date) cal.getNthDayOfWeek(dayOfMonth, dayOfWeek, cdate); in getTransition() 765 cdate = (BaseCalendar.Date) cal.getNthDayOfWeek(1, dayOfWeek, cdate); in getTransition() 770 cdate = (BaseCalendar.Date) cal.getNthDayOfWeek(-1, dayOfWeek, cdate); in getTransition()
|
D | JapaneseImperialCalendar.java | 1396 int dayOfWeek = gcal.getDayOfWeek(d); in getActualMaximum() 1398 dayOfWeek -= getFirstDayOfWeek(); in getActualMaximum() 1399 if (dayOfWeek < 0) { in getActualMaximum() 1400 dayOfWeek += 7; in getActualMaximum() 1403 int magic = dayOfWeek + getMinimalDaysInFirstWeek() - 1; in getActualMaximum() 1432 int dayOfWeek = gcal.getDayOfWeek(d); in getActualMaximum() 1434 dayOfWeek -= getFirstDayOfWeek(); in getActualMaximum() 1435 if (dayOfWeek < 0) { in getActualMaximum() 1436 dayOfWeek += 7; in getActualMaximum() 1438 int nDaysFirstWeek = 7 - dayOfWeek; // # of days in the first week in getActualMaximum() [all …]
|
D | Calendar.java | 1286 public Builder setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) { in setWeekDate() argument 1290 internalSet(DAY_OF_WEEK, dayOfWeek); in setWeekDate() 1536 int dayOfWeek = isSet(DAY_OF_WEEK) in build() local 1538 cal.setWeekDate(fields[NFIELDS + WEEK_YEAR], weekOfYear, dayOfWeek); in build() 3071 public void setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) { in setWeekDate() argument
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKLocalizedFieldParser.java | 103 field = weekDef.dayOfWeek(); in test_parse_textField() 159 assertEquals(parsed.isSupported(WeekFields.of(locale).dayOfWeek()), true); in test_parse_textLocalDate() 196 assertEquals(parsed.isSupported(weekDef.dayOfWeek()), pattern.indexOf('e') >= 0); in test_parse_WeekBasedYear()
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | ZoneOffsetTransitionRule.java | 174 DayOfWeek dayOfWeek, in of() argument 193 …return new ZoneOffsetTransitionRule(month, dayOfMonthIndicator, dayOfWeek, time, timeEndOfDay, tim… in of() 216 DayOfWeek dayOfWeek, in ZoneOffsetTransitionRule() argument 225 this.dow = dayOfWeek; in ZoneOffsetTransitionRule()
|
D | IcuZoneRulesProvider.java | 231 DayOfWeek dayOfWeek = DayOfWeek.SATURDAY.plus(dateTimeRule.getRuleDayOfWeek()); in toZoneOffsetTransitionRule() local 236 dayOfWeek = null; in toZoneOffsetTransitionRule() 286 month, dayOfMonthIndicator, dayOfWeek, time, timeEndOfDay, timeDefinition, in toZoneOffsetTransitionRule()
|
/libcore/luni/src/main/java/libcore/util/ |
D | ZoneInfo.java | 102 public int getOffset(int era, int year, int month, int day, int dayOfWeek, int millis) { in getOffset() argument 103 return mDelegate.getOffset(era, year, month, day, dayOfWeek, millis); in getOffset()
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestTextPrinter.java | 253 …ic void test_formatDayOfWeek(Locale locale, String pattern, String expected, DayOfWeek dayOfWeek) { in test_formatDayOfWeek() argument 255 String text = formatter.format(dayOfWeek); in test_formatDayOfWeek()
|
/libcore/ojluni/annotations/sdk/nullability/java/util/ |
D | Calendar.annotated.java | 140 public void setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) { throw new RuntimeException("… in setWeekDate() argument 291 …ava.util.Calendar.Builder setWeekDate(int weekYear, int weekOfYear, int dayOfWeek) { throw new Run… in setWeekDate() argument
|