Home
last modified time | relevance | path

Searched refs:week (Results 1 – 6 of 6) sorted by relevance

/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestIsoWeekFields.java150 int week = 1; in test_getFrom() local
154 assertEquals(weekField.getFrom(date), week); in test_getFrom() local
158 week++; in test_getFrom()
162 if (week > wbyLen(wby)) { in test_getFrom()
163 week = 1; in test_getFrom()
178 int week = 1; in test_adjustInto_dow() local
184 assertEquals(adjusted.get(weekField), week); in test_adjustInto_dow() local
189 week++; in test_adjustInto_dow()
193 if (week > wbyLen(wby)) { in test_adjustInto_dow()
194 week = 1; in test_adjustInto_dow()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKWeekFields.java98 WeekFields week = WeekFields.of(firstDayOfWeek, minDays); in test_of_DayOfWeek_int_singleton() local
99 assertEquals(week.getFirstDayOfWeek(), firstDayOfWeek, "Incorrect firstDayOfWeek"); in test_of_DayOfWeek_int_singleton()
100 assertEquals(week.getMinimalDaysInFirstWeek(), minDays, "Incorrect MinimalDaysInFirstWeek"); in test_of_DayOfWeek_int_singleton()
101 assertSame(WeekFields.of(firstDayOfWeek, minDays), week); in test_of_DayOfWeek_int_singleton() local
107 WeekFields week = WeekFields.of(firstDayOfWeek, minDays); in test_basics() local
108 assertEquals(week.dayOfWeek().isDateBased(), true); in test_basics()
109 assertEquals(week.dayOfWeek().isTimeBased(), false); in test_basics()
111 assertEquals(week.weekOfMonth().isDateBased(), true); in test_basics()
112 assertEquals(week.weekOfMonth().isTimeBased(), false); in test_basics()
114 assertEquals(week.weekOfYear().isDateBased(), true); in test_basics()
[all …]
DTCKIsoFields.java324 public void test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WOWBY() argument
326 assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.getFrom(date), week); in test_WOWBY() local
327 assertEquals(date.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR), week); in test_WOWBY() local
339 public void test_WBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WBY() argument
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()
[all …]
/libcore/ojluni/src/main/java/java/time/temporal/
DWeekFields.java836 int week = computeWeek(offset, doy); in localizedWeekBasedYear() local
837 if (week == 0) { in localizedWeekBasedYear()
846 if (week >= newYearWeek) { in localizedWeekBasedYear()
866 int week = computeWeek(offset, doy); in localizedWeekOfWeekBasedYear() local
867 if (week == 0) { in localizedWeekOfWeekBasedYear()
873 } else if (week > 50) { in localizedWeekOfWeekBasedYear()
879 if (week >= newYearWeek) { in localizedWeekOfWeekBasedYear()
881 week = week - newYearWeek + 1; in localizedWeekOfWeekBasedYear()
884 return week; in localizedWeekOfWeekBasedYear()
1164 int week = computeWeek(offset, doy); in rangeWeekOfWeekBasedYear() local
[all …]
DIsoFields.java570 int week = getWeek(date); in adjustInto() local
571 if (week == 53 && getWeekRange(newWby) == 52) { in adjustInto()
572 week = 52; in adjustInto()
575 int days = (dow - resolved.get(DAY_OF_WEEK)) + ((week - 1) * 7); in adjustInto()
637 int week = ((doy0 - firstMonDoy0) / 7) + 1; in getWeek() local
638 if (week == 53) { in getWeek()
640 week = 1; in getWeek()
643 return week; in getWeek()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeFormatters.java1111 private int week = 1; in weekDate() local
1119 if (week < 10) { in weekDate()
1122 sb.append(week).append('-').append(day).append(date.getOffset()); in weekDate()
1128 week++; in weekDate()