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.java140 int week = 1; in test_getFrom() local
144 assertEquals(weekField.getFrom(date), week); in test_getFrom() local
148 week++; in test_getFrom()
152 if (week > wbyLen(wby)) { in test_getFrom()
153 week = 1; in test_getFrom()
168 int week = 1; in test_adjustInto_dow() local
174 assertEquals(adjusted.get(weekField), week); in test_adjustInto_dow() local
179 week++; in test_adjustInto_dow()
183 if (week > wbyLen(wby)) { in test_adjustInto_dow()
184 week = 1; in test_adjustInto_dow()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKWeekFields.java96 WeekFields week = WeekFields.of(firstDayOfWeek, minDays); in test_of_DayOfWeek_int_singleton() local
97 assertEquals(week.getFirstDayOfWeek(), firstDayOfWeek, "Incorrect firstDayOfWeek"); in test_of_DayOfWeek_int_singleton()
98 assertEquals(week.getMinimalDaysInFirstWeek(), minDays, "Incorrect MinimalDaysInFirstWeek"); in test_of_DayOfWeek_int_singleton()
99 assertSame(WeekFields.of(firstDayOfWeek, minDays), week); in test_of_DayOfWeek_int_singleton() local
105 WeekFields week = WeekFields.of(firstDayOfWeek, minDays); in test_basics() local
106 assertEquals(week.dayOfWeek().isDateBased(), true); in test_basics()
107 assertEquals(week.dayOfWeek().isTimeBased(), false); in test_basics()
109 assertEquals(week.weekOfMonth().isDateBased(), true); in test_basics()
110 assertEquals(week.weekOfMonth().isTimeBased(), false); in test_basics()
112 assertEquals(week.weekOfYear().isDateBased(), true); in test_basics()
[all …]
DTCKIsoFields.java321 public void test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WOWBY() argument
323 assertEquals(IsoFields.WEEK_OF_WEEK_BASED_YEAR.getFrom(date), week); in test_WOWBY() local
324 assertEquals(date.get(IsoFields.WEEK_OF_WEEK_BASED_YEAR), week); in test_WOWBY() local
336 public void test_WBY(LocalDate date, DayOfWeek dow, int week, int wby) { in test_WBY() argument
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()
[all …]
/libcore/ojluni/src/main/java/java/time/temporal/
DWeekFields.java811 int week = computeWeek(offset, doy); in localizedWeekBasedYear() local
812 if (week == 0) { in localizedWeekBasedYear()
821 if (week >= newYearWeek) { in localizedWeekBasedYear()
841 int week = computeWeek(offset, doy); in localizedWeekOfWeekBasedYear() local
842 if (week == 0) { in localizedWeekOfWeekBasedYear()
848 } else if (week > 50) { in localizedWeekOfWeekBasedYear()
854 if (week >= newYearWeek) { in localizedWeekOfWeekBasedYear()
856 week = week - newYearWeek + 1; in localizedWeekOfWeekBasedYear()
859 return week; in localizedWeekOfWeekBasedYear()
1132 int week = computeWeek(offset, doy); in rangeWeekOfWeekBasedYear() local
[all …]
DIsoFields.java542 int week = getWeek(date); in adjustInto() local
543 if (week == 53 && getWeekRange(newWby) == 52) { in adjustInto()
544 week = 52; in adjustInto()
547 int days = (dow - resolved.get(DAY_OF_WEEK)) + ((week - 1) * 7); in adjustInto()
612 int week = ((doy0 - firstMonDoy0) / 7) + 1; in getWeek() local
613 if (week == 53) { in getWeek()
615 week = 1; in getWeek()
618 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()