Home
last modified time | relevance | path

Searched refs:DAY_OF_WEEK (Results 1 – 25 of 64) sorted by relevance

123

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestDateTimeTextProvider.java63 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
89 {DAY_OF_WEEK, 1, TextStyle.SHORT, enUS, "Mon"}, in data_text()
90 {DAY_OF_WEEK, 2, TextStyle.SHORT, enUS, "Tue"}, in data_text()
91 {DAY_OF_WEEK, 3, TextStyle.SHORT, enUS, "Wed"}, in data_text()
92 {DAY_OF_WEEK, 4, TextStyle.SHORT, enUS, "Thu"}, in data_text()
93 {DAY_OF_WEEK, 5, TextStyle.SHORT, enUS, "Fri"}, in data_text()
94 {DAY_OF_WEEK, 6, TextStyle.SHORT, enUS, "Sat"}, in data_text()
95 {DAY_OF_WEEK, 7, TextStyle.SHORT, enUS, "Sun"}, in data_text()
98 {DAY_OF_WEEK, 1, TextStyle.SHORT, ptBR, "seg."}, in data_text()
99 {DAY_OF_WEEK, 2, TextStyle.SHORT, ptBR, "ter."}, in data_text()
[all …]
DTestTextPrinter.java63 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
93 getFormatter(DAY_OF_WEEK, TextStyle.FULL).formatTo(EMPTY_DTA, buf); in test_print_emptyCalendrical()
98 getFormatter(DAY_OF_WEEK, TextStyle.FULL).formatTo(LocalDate.of(2012, 4, 18), buf); in test_print_append()
106 {DAY_OF_WEEK, TextStyle.FULL, 1, "Monday"}, in provider_dow()
107 {DAY_OF_WEEK, TextStyle.FULL, 2, "Tuesday"}, in provider_dow()
108 {DAY_OF_WEEK, TextStyle.FULL, 3, "Wednesday"}, in provider_dow()
109 {DAY_OF_WEEK, TextStyle.FULL, 4, "Thursday"}, in provider_dow()
110 {DAY_OF_WEEK, TextStyle.FULL, 5, "Friday"}, in provider_dow()
111 {DAY_OF_WEEK, TextStyle.FULL, 6, "Saturday"}, in provider_dow()
112 {DAY_OF_WEEK, TextStyle.FULL, 7, "Sunday"}, in provider_dow()
[all …]
DTestTextParser.java63 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
92 {DAY_OF_WEEK, TextStyle.FULL, "Monday", -1, IndexOutOfBoundsException.class}, in data_error()
93 {DAY_OF_WEEK, TextStyle.FULL, "Monday", 7, IndexOutOfBoundsException.class}, in data_error()
109 assertEquals(getFormatter(DAY_OF_WEEK, TextStyle.FULL) in test_parse_midStr()
111 .getLong(DAY_OF_WEEK), 1L); in test_parse_midStr()
117 assertEquals(getFormatter(DAY_OF_WEEK, TextStyle.SHORT) in test_parse_remainderIgnored()
119 .getLong(DAY_OF_WEEK), 3L); in test_parse_remainderIgnored()
127 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Munday", pos); in test_parse_noMatch1()
135 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Monday", pos); in test_parse_noMatch2()
143 getFormatter(DAY_OF_WEEK, TextStyle.FULL).parseUnresolved("Monday", pos); in test_parse_noMatch_atEnd()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeTextPrinting.java63 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
98 {DAY_OF_WEEK, TextStyle.FULL, 1, "Monday"}, in data_text()
99 {DAY_OF_WEEK, TextStyle.FULL, 2, "Tuesday"}, in data_text()
100 {DAY_OF_WEEK, TextStyle.FULL, 3, "Wednesday"}, in data_text()
101 {DAY_OF_WEEK, TextStyle.FULL, 4, "Thursday"}, in data_text()
102 {DAY_OF_WEEK, TextStyle.FULL, 5, "Friday"}, in data_text()
103 {DAY_OF_WEEK, TextStyle.FULL, 6, "Saturday"}, in data_text()
104 {DAY_OF_WEEK, TextStyle.FULL, 7, "Sunday"}, in data_text()
106 {DAY_OF_WEEK, TextStyle.SHORT, 1, "Mon"}, in data_text()
107 {DAY_OF_WEEK, TextStyle.SHORT, 2, "Tue"}, in data_text()
[all …]
/libcore/ojluni/src/main/java/java/time/
DDayOfWeek.java64 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
192 return of(temporal.get(DAY_OF_WEEK)); in from()
227 …return new DateTimeFormatterBuilder().appendText(DAY_OF_WEEK, style).toFormatter(locale).format(th… in getDisplayName()
253 return field == DAY_OF_WEEK; in isSupported()
282 if (field == DAY_OF_WEEK) { in range()
315 if (field == DAY_OF_WEEK) { in get()
345 if (field == DAY_OF_WEEK) { in getLong()
454 return temporal.with(DAY_OF_WEEK, getValue()); in adjustInto()
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporalAdjusters.java65 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
352 int curDow = temp.get(DAY_OF_WEEK); in dayOfWeekInMonth()
360 int curDow = temp.get(DAY_OF_WEEK); in dayOfWeekInMonth()
389 int calDow = temporal.get(DAY_OF_WEEK);
415 int calDow = temporal.get(DAY_OF_WEEK);
443 int calDow = temporal.get(DAY_OF_WEEK);
469 int calDow = temporal.get(DAY_OF_WEEK);
DIsoFields.java64 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
470 Long dowLong = fieldValues.get(DAY_OF_WEEK); 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()
497 date = date.plusWeeks(wowby - 1).with(DAY_OF_WEEK, dow); in resolve()
501 fieldValues.remove(DAY_OF_WEEK); in resolve()
541 int dow = date.get(DAY_OF_WEEK); in adjustInto()
547 int days = (dow - resolved.get(DAY_OF_WEEK)) + ((week - 1) * 7); in adjustInto()
DWeekFields.java69 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
777 int isoDow = temporal.get(DAY_OF_WEEK); in localizedDayOfWeek()
927 fieldValues.put(DAY_OF_WEEK, isoDow); in resolve()
932 if (fieldValues.containsKey(DAY_OF_WEEK) == false) { in resolve()
935 int isoDow = DAY_OF_WEEK.checkValidIntValue(fieldValues.get(DAY_OF_WEEK)); in resolve()
979 fieldValues.remove(DAY_OF_WEEK); in resolveWoM()
1001 fieldValues.remove(DAY_OF_WEEK); in resolveWoY()
1026 fieldValues.remove(DAY_OF_WEEK); in resolveWBY()
1073 if (temporal.isSupported(DAY_OF_WEEK)) { in isSupportedBy()
DChronoField.java345 DAY_OF_WEEK("DayOfWeek", DAYS, WEEKS, ValueRange.of(1, 7), "weekday"), enumConstant
642 case DAY_OF_WEEK: in getIcuFieldNumber()
699 return ordinal() >= DAY_OF_WEEK.ordinal() && ordinal() <= ERA.ordinal(); in isDateBased()
711 return ordinal() < DAY_OF_WEEK.ordinal(); in isTimeBased()
/libcore/ojluni/src/main/java/java/text/
DCalendarBuilder.java70 index = DAY_OF_WEEK; in set()
89 index = DAY_OF_WEEK; in isSet()
96 index = DAY_OF_WEEK; in clear()
128 int dayOfWeek = isSet(DAY_OF_WEEK) ? in establish()
129 field[MAX_FIELD + DAY_OF_WEEK] : cal.getFirstDayOfWeek(); in establish()
/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestIsoWeekFields.java27 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
145 assertEquals(DAY_OF_WEEK.getFrom(date), dow); in test_getFrom()
160 assertEquals(DAY_OF_WEEK.getFrom(date), 1); in test_getFrom()
172 LocalDate adjusted = DAY_OF_WEEK.adjustInto(date, j); in test_adjustInto_dow()
173 assertEquals(adjusted.get(DAY_OF_WEEK), j); in test_adjustInto_dow()
203 assertEquals(adjusted.get(DAY_OF_WEEK), dow); in test_adjustInto_week()
231 assertEquals(adjusted.get(DAY_OF_WEEK), dow); in test_adjustInto_wby()
259 assertEquals(adjusted.get(DAY_OF_WEEK), dow); in test_addTo_weekBasedYears()
DTestDateTimeBuilderCombinations.java67 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
96 …{YEAR, 2012, ALIGNED_WEEK_OF_YEAR, 6, DAY_OF_WEEK, 3, null, null, LocalDate.class, LocalDate.of(20… in data_combine()
174 {DAY_OF_WEEK, 127, DAY_OF_WEEK, 127L}, in data_normalized()
DTestChronoField.java89 fieldMap.put(ChronoField.DAY_OF_WEEK, "weekday"); in initClass()
112 {ChronoField.DAY_OF_WEEK}, in data_localeDisplayNames()
/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()
69 assertTrue("Incorrect DAY_OF_WEEK: " + cal.get(Calendar.DAY_OF_WEEK) in test_setII()
70 + " expected: " + dow, cal.get(Calendar.DAY_OF_WEEK) != dow); in test_setII()
74 cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); in test_setII()
80 cal.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY); in test_setII()
86 cal.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY); in test_setII()
129 cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); in test_setII()
140 cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); in test_setII()
149 cal.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY); in test_setII()
157 cal.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY); in test_setII()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDataFormatFieldTest.java70 MyField field = new MyField("a field", Calendar.DAY_OF_WEEK); in test_ConstructorLjava_lang_StringI()
74 Calendar.DAY_OF_WEEK, field.getCalendarField()); in test_ConstructorLjava_lang_StringI()
77 .ofCalendarField(Calendar.DAY_OF_WEEK); in test_ConstructorLjava_lang_StringI()
79 DateFormat.Field.DAY_OF_WEEK, realField); in test_ConstructorLjava_lang_StringI()
DSupport_SimpleDateFormat.java85 t_FormatWithField(10, format, date, null, Field.DAY_OF_WEEK, 102, 105); in t_format_with_FieldPosition()
114 t_FormatWithField(32, format, date, null, Field.DAY_OF_WEEK, 0, 0); in t_format_with_FieldPosition()
178 v.add(new FieldContainer(23, 29, Field.DAY_OF_WEEK)); in getDateVector2()
237 v.add(new FieldContainer(102, 105, Field.DAY_OF_WEEK)); in getDateVector4()
238 v.add(new FieldContainer(106, 112, Field.DAY_OF_WEEK)); in getDateVector4()
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKWeekFields.java63 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
389 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(SMART); in test_parse_resolve_localizedWom()
391 date.get(womField) + ":" + date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWom()
410 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(LENIENT); in test_parse_resolve_localizedWom_lenient()
412 int dow = date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWom_lenient()
431 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(STRICT); in test_parse_resolve_localizedWom_strict()
438 assertEquals(date.get(DAY_OF_WEEK), 1); in test_parse_resolve_localizedWom_strict()
503 .appendValue(DAY_OF_WEEK).toFormatter(); in test_parse_resolve_localizedWoy()
505 date.get(woyField) + ":" + date.get(DAY_OF_WEEK); in test_parse_resolve_localizedWoy()
523 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(LENIENT); in test_parse_resolve_localizedWoy_lenient()
[all …]
DTCKIsoFields.java66 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
355 .appendValue(DAY_OF_WEEK) in test_parse_weeks_STRICT()
366 .appendValue(DAY_OF_WEEK) in test_parse_weeks_SMART()
377 .appendValue(DAY_OF_WEEK) in test_parse_weeks_LENIENT()
405 .appendValue(DAY_OF_WEEK) in test_parse_parseLenientWeek_STRICT()
415 .appendValue(DAY_OF_WEEK) in test_parse_parseLenientWeek_SMART()
435 .appendValue(DAY_OF_WEEK) in test_parse_parseLenientWeek_LENIENT()
DTCKChronoField.java67 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
128 {DAY_OF_WEEK, DAYS, WEEKS}, in data_fieldUnit()
157 {DAY_OF_WEEK, true, false}, in data_fieldBased()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeTextProvider.java69 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
187 } else if (field == DAY_OF_WEEK) { in getText()
188 fieldIndex = Calendar.DAY_OF_WEEK; in getText()
259 case DAY_OF_WEEK: in getTextIterator()
260 fieldIndex = Calendar.DAY_OF_WEEK; in getTextIterator()
295 case Calendar.DAY_OF_WEEK: in getTextIterator()
381 if (field == DAY_OF_WEEK) { in createStore()
384 "gregory", Calendar.DAY_OF_WEEK, textStyle.toCalendarStyle(), locale); in createStore()
397 … "gregory", Calendar.DAY_OF_WEEK, wday, textStyle.toCalendarStyle(), locale); in createStore()
/libcore/ojluni/src/main/java/java/time/chrono/
DAbstractChronology.java69 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
478 if (fieldValues.containsKey(DAY_OF_WEEK)) { in resolveDate()
490 if (fieldValues.containsKey(DAY_OF_WEEK)) { in resolveDate()
604 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYMAD()
609 … int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK); in resolveYMAD()
637 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYAD()
641 … int dow = range(DAY_OF_WEEK).checkValidIntValue(fieldValues.remove(DAY_OF_WEEK), DAY_OF_WEEK); in resolveYAD()
/libcore/luni/src/test/java/libcore/java/util/
DGregorianCalendarTest.java70 int differentDayOfWeek = greg.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY in test_computeFields_dayOfWeekAndWeekOfYearSet()
77 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet()
83 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet()
86 assertEquals(differentDayOfWeek, greg.get(Calendar.DAY_OF_WEEK)); in test_computeFields_dayOfWeekAndWeekOfYearSet()
92 greg.set(Calendar.DAY_OF_WEEK, differentDayOfWeek); in test_computeFields_dayOfWeekAndWeekOfYearSet()
94 assertEquals(differentDayOfWeek, greg.get(Calendar.DAY_OF_WEEK)); in test_computeFields_dayOfWeekAndWeekOfYearSet()
221 assertEquals(Calendar.TUESDAY, cal.get(Calendar.DAY_OF_WEEK)); in test_setWeekDate()
227 assertEquals(Calendar.TUESDAY, cal.get(Calendar.DAY_OF_WEEK)); in test_setWeekDate()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKDayOfWeek.java65 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
111 DAY_OF_WEEK, in validFields()
183 assertEquals(DayOfWeek.THURSDAY.isSupported(ChronoField.DAY_OF_WEEK), true); in test_isSupported_TemporalField()
205 assertEquals(DayOfWeek.WEDNESDAY.getLong(ChronoField.DAY_OF_WEEK), 3); in test_get_TemporalField()
210 assertEquals(DayOfWeek.WEDNESDAY.getLong(ChronoField.DAY_OF_WEEK), 3); in test_getLong_TemporalField()
/libcore/ojluni/src/main/java/java/util/
DGregorianCalendar.java1042 case DAY_OF_WEEK:
1282 set(DAY_OF_WEEK, internalGet(DAY_OF_WEEK)); in roll()
1361 int dow = internalGet(DAY_OF_WEEK) - getFirstDayOfWeek(); in roll()
1450 case DAY_OF_WEEK: in roll()
1497 set(DAY_OF_WEEK, internalGet(DAY_OF_WEEK)); in roll()
1915 dow1 = gc.get(DAY_OF_WEEK); in getActualMaximum()
2130 int delta = getFirstDayOfWeek() - cal.get(DAY_OF_WEEK); in getWeekYear()
2146 int del = getFirstDayOfWeek() - cal.get(DAY_OF_WEEK); in getWeekYear()
2222 gc.set(DAY_OF_WEEK, getFirstDayOfWeek()); in setWeekDate()
2237 || gc.internalGet(DAY_OF_WEEK) != dayOfWeek)) { in setWeekDate()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/
DTCKChronoFieldSerialization.java67 import static java.time.temporal.ChronoField.DAY_OF_WEEK;
108 {DAY_OF_WEEK}, in data_fieldBased()

123