Home
last modified time | relevance | path

Searched refs:date (Results 1 – 25 of 169) sorted by relevance

1234567

/libcore/ojluni/src/test/java/time/test/java/time/temporal/
DTestChronoUnit.java89 {date(1939, SEPTEMBER, 2), date(1939, SEPTEMBER, 1), 0}, in data_yearsBetween()
90 {date(1939, SEPTEMBER, 2), date(1939, SEPTEMBER, 2), 0}, in data_yearsBetween()
91 {date(1939, SEPTEMBER, 2), date(1939, SEPTEMBER, 3), 0}, in data_yearsBetween()
93 {date(1939, SEPTEMBER, 2), date(1940, SEPTEMBER, 1), 0}, in data_yearsBetween()
94 {date(1939, SEPTEMBER, 2), date(1940, SEPTEMBER, 2), 1}, in data_yearsBetween()
95 {date(1939, SEPTEMBER, 2), date(1940, SEPTEMBER, 3), 1}, in data_yearsBetween()
97 {date(1939, SEPTEMBER, 2), date(1938, SEPTEMBER, 1), -1}, in data_yearsBetween()
98 {date(1939, SEPTEMBER, 2), date(1938, SEPTEMBER, 2), -1}, in data_yearsBetween()
99 {date(1939, SEPTEMBER, 2), date(1938, SEPTEMBER, 3), 0}, in data_yearsBetween()
101 {date(1939, SEPTEMBER, 2), date(1945, SEPTEMBER, 3), 6}, in data_yearsBetween()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKIsoChronology.java151 assertEquals(IsoChronology.INSTANCE.date(new TemporalAccessor() { in test_date_TemporalAccessor()
181 IsoChronology.INSTANCE.date(null); in test_date_TemporalAccessor_null()
358 LocalDate date = IsoChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra() local
359 assertEquals(date, null); in test_resolve_yearOfEra()
377 {2012, 1, -365, date(2010, 12, 31), false, false}, in data_resolve_ymd()
378 {2012, 1, -364, date(2011, 1, 1), false, false}, in data_resolve_ymd()
379 {2012, 1, -31, date(2011, 11, 30), false, false}, in data_resolve_ymd()
380 {2012, 1, -30, date(2011, 12, 1), false, false}, in data_resolve_ymd()
381 {2012, 1, -12, date(2011, 12, 19), false, false}, in data_resolve_ymd()
382 {2012, 1, 1, date(2012, 1, 1), true, true}, in data_resolve_ymd()
[all …]
DTCKHijrahChronology.java150 HijrahChronology.INSTANCE.date(year, month, dom); in test_badDates()
174 ChronoLocalDate date = HijrahChronology.INSTANCE.date(era, 1, 1, 1); in test_InvalidEras() local
219 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraOnly_valid() local
220 assertEquals(date, null); in test_resolve_yearOfEra_eraOnly_valid()
230 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() local
231 assertEquals(date, null); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
243 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraAndYearOnly_valid() local
244 assertEquals(date, null); in test_resolve_yearOfEra_eraAndYearOnly_valid()
264 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_yearOfEraOnly_valid() local
265 assertEquals(date, null); in test_resolve_yearOfEra_yearOfEraOnly_valid()
[all …]
DTCKThaiBuddhistChronology.java168 {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 1), LocalDate.of(1, 1, 1)}, in data_samples()
169 {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 2), LocalDate.of(1, 1, 2)}, in data_samples()
170 {ThaiBuddhistChronology.INSTANCE.date(1 + YDIFF, 1, 3), LocalDate.of(1, 1, 3)}, in data_samples()
172 {ThaiBuddhistChronology.INSTANCE.date(2 + YDIFF, 1, 1), LocalDate.of(2, 1, 1)}, in data_samples()
173 {ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 1, 1), LocalDate.of(3, 1, 1)}, in data_samples()
174 {ThaiBuddhistChronology.INSTANCE.date(3 + YDIFF, 12, 6), LocalDate.of(3, 12, 6)}, in data_samples()
175 {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 1, 1), LocalDate.of(4, 1, 1)}, in data_samples()
176 {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 3), LocalDate.of(4, 7, 3)}, in data_samples()
177 {ThaiBuddhistChronology.INSTANCE.date(4 + YDIFF, 7, 4), LocalDate.of(4, 7, 4)}, in data_samples()
178 {ThaiBuddhistChronology.INSTANCE.date(5 + YDIFF, 1, 1), LocalDate.of(5, 1, 1)}, in data_samples()
[all …]
DTCKMinguoChronology.java131 {MinguoChronology.INSTANCE.date(1, 1, 1), LocalDate.of(1 + YDIFF, 1, 1)}, in data_samples()
132 {MinguoChronology.INSTANCE.date(1, 1, 2), LocalDate.of(1 + YDIFF, 1, 2)}, in data_samples()
133 {MinguoChronology.INSTANCE.date(1, 1, 3), LocalDate.of(1 + YDIFF, 1, 3)}, in data_samples()
135 {MinguoChronology.INSTANCE.date(2, 1, 1), LocalDate.of(2 + YDIFF, 1, 1)}, in data_samples()
136 {MinguoChronology.INSTANCE.date(3, 1, 1), LocalDate.of(3 + YDIFF, 1, 1)}, in data_samples()
137 {MinguoChronology.INSTANCE.date(3, 12, 6), LocalDate.of(3 + YDIFF, 12, 6)}, in data_samples()
138 {MinguoChronology.INSTANCE.date(4, 1, 1), LocalDate.of(4 + YDIFF, 1, 1)}, in data_samples()
139 {MinguoChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4 + YDIFF, 7, 3)}, in data_samples()
140 {MinguoChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4 + YDIFF, 7, 4)}, in data_samples()
141 {MinguoChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5 + YDIFF, 1, 1)}, in data_samples()
[all …]
DTCKJapaneseChronology.java197 JapaneseDate dateByChronoFactory = JapaneseChronology.INSTANCE.date(era, yoe, moy, dom); in test_createEymd()
221 assertEquals(IsoChronology.INSTANCE.date(test), iso); in test_createByEra_chronologyTemporalFactory()
222 assertEquals(JapaneseChronology.INSTANCE.date(iso), test); in test_createByEra_chronologyTemporalFactory()
265 JapaneseDate dateByChronoFactory = JapaneseChronology.INSTANCE.date(y, moy, dom); in test_createYmd()
289 assertEquals(IsoChronology.INSTANCE.date(test), iso); in test_createByProleptic_chronologyTemporalFactory()
290 assertEquals(JapaneseChronology.INSTANCE.date(iso), test); in test_createByProleptic_chronologyTemporalFactory()
363 JapaneseChronology.INSTANCE.date(year, month, dom); in test_badDates()
446 ChronoLocalDate date = JapaneseChronology.INSTANCE.date(era, 1, 1, 1); in test_InvalidEras() local
468 JapaneseDate base = JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 63, 6, 30); in test_getLong()
481 JapaneseDate base = JapaneseChronology.INSTANCE.date(JapaneseEra.SHOWA, 63, 6, 30); in test_with_TemporalField_long()
[all …]
DTCKChronoLocalDate.java116 ChronoLocalDate date = chrono.date(refDate); in test_badWithAdjusterChrono() local
119 ChronoLocalDate date2 = chrono2.date(refDate); in test_badWithAdjusterChrono()
123 date.with(adjuster); in test_badWithAdjusterChrono()
130 ChronoLocalDate result = date.with(adjuster); in test_badWithAdjusterChrono()
139 ChronoLocalDate date = chrono.date(refDate); in test_badPlusAdjusterChrono() local
142 ChronoLocalDate date2 = chrono2.date(refDate); in test_badPlusAdjusterChrono()
146 date.plus(adjuster); in test_badPlusAdjusterChrono()
153 ChronoLocalDate result = date.plus(adjuster); in test_badPlusAdjusterChrono()
162 ChronoLocalDate date = chrono.date(refDate); in test_badMinusAdjusterChrono() local
165 ChronoLocalDate date2 = chrono2.date(refDate); in test_badMinusAdjusterChrono()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKTemporalAdjusters.java92 TemporalAdjuster test = TemporalAdjusters.ofDateAdjuster(date -> date.plusDays(2)); in factory_ofDateAdjuster()
114 LocalDate date = date(2007, month, i); in test_firstDayOfMonth_nonLeap() local
115 LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfMonth().adjustInto(date); in test_firstDayOfMonth_nonLeap()
127 LocalDate date = date(2008, month, i); in test_firstDayOfMonth_leap() local
128 LocalDate test = (LocalDate) TemporalAdjusters.firstDayOfMonth().adjustInto(date); in test_firstDayOfMonth_leap()
148 LocalDate date = date(2007, month, i); in test_lastDayOfMonth_nonLeap() local
149 LocalDate test = (LocalDate) TemporalAdjusters.lastDayOfMonth().adjustInto(date); in test_lastDayOfMonth_nonLeap()
161 LocalDate date = date(2008, month, i); in test_lastDayOfMonth_leap() local
162 LocalDate test = (LocalDate) TemporalAdjusters.lastDayOfMonth().adjustInto(date); in test_lastDayOfMonth_leap()
182 LocalDate date = date(2007, month, i); in test_firstDayOfNextMonth_nonLeap() local
[all …]
DTCKWeekFields.java125 LocalDate date = LocalDate.of(2000, 1, 10); // Known to be ISO Monday in test_dayOfWeekField_simpleGet() local
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()
134 assertEquals(date.get(WeekFields.of(DayOfWeek.TUESDAY, 1).dayOfWeek()), 7); in test_dayOfWeekField_simpleGet()
[all …]
DTCKIsoFields.java124 public void test_DOQ(LocalDate date, int doq, int qoy) { in test_DOQ() argument
125 assertEquals(IsoFields.DAY_OF_QUARTER.getFrom(date), doq); in test_DOQ()
126 assertEquals(date.get(IsoFields.DAY_OF_QUARTER), doq); in test_DOQ()
138 public void test_QOY(LocalDate date, int doq, int qoy) { in test_QOY() argument
139 assertEquals(IsoFields.QUARTER_OF_YEAR.getFrom(date), qoy); in test_QOY()
140 assertEquals(date.get(IsoFields.QUARTER_OF_YEAR), qoy); in test_QOY()
152 public void test_parse_quarters(LocalDate date, int doq, int qoy) { in test_parse_quarters() argument
158 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); in test_parse_quarters()
159 assertEquals(parsed, date); in test_parse_quarters()
163 public void test_parse_quarters_SMART(LocalDate date, int doq, int qoy) { in test_parse_quarters_SMART() argument
[all …]
/libcore/ojluni/src/main/java/sun/util/calendar/
DImmutableGregorianDate.java32 private final BaseCalendar.Date date; field in ImmutableGregorianDate
34 ImmutableGregorianDate(BaseCalendar.Date date) { in ImmutableGregorianDate() argument
35 if (date == null) { in ImmutableGregorianDate()
38 this.date = date; in ImmutableGregorianDate()
42 return date.getEra(); in getEra()
50 return date.getYear(); in getYear()
62 return date.isLeapYear(); in isLeapYear()
70 return date.getMonth(); in getMonth()
82 return date.getDayOfMonth(); in getDayOfMonth()
85 public CalendarDate setDayOfMonth(int date) { in setDayOfMonth() argument
[all …]
DAbstractCalendar.java85 public void setEra(CalendarDate date, String eraName) { in setEra() argument
92 date.setEra(e); in setEra()
112 CalendarDate date = newCalendarDate(zone); in getCalendarDate() local
113 return getCalendarDate(millis, date); in getCalendarDate()
116 public CalendarDate getCalendarDate(long millis, CalendarDate date) { in getCalendarDate() argument
123 TimeZone zi = date.getZone(); in getCalendarDate()
148 date.setZoneOffset(zoneOffset); in getCalendarDate()
149 date.setDaylightSaving(saving); in getCalendarDate()
170 getCalendarDateFromFixedDate(date, days); in getCalendarDate()
173 setTimeOfDay(date, ms); in getCalendarDate()
[all …]
DBaseCalendar.java191 public boolean validate(CalendarDate date) { in validate() argument
192 Date bdate = (Date) date; in validate()
209 if (!validateTime(date)) { in validate()
217 public boolean normalize(CalendarDate date) { in normalize() argument
218 if (date.isNormalized()) { in normalize()
222 Date bdate = (Date) date; in normalize()
228 getTime(date); in normalize()
265 date.setLeapYear(isLeapYear(bdate.getNormalizedYear())); in normalize()
266 date.setZoneOffset(0); in normalize()
267 date.setDaylightSaving(0); in normalize()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestChronoLocalDate.java86 ChronoLocalDate date = LocalDate.of(2013, 1, 1); in test_date_comparator_checkGenerics_ISO() local
89 dates.add(date.minus(10, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO()
90 dates.add(date.minus(1, ChronoUnit.YEARS)); in test_date_comparator_checkGenerics_ISO()
91 dates.add(date.minus(1, ChronoUnit.MONTHS)); in test_date_comparator_checkGenerics_ISO()
92 dates.add(date.minus(1, ChronoUnit.WEEKS)); in test_date_comparator_checkGenerics_ISO()
93 dates.add(date.minus(1, ChronoUnit.DAYS)); in test_date_comparator_checkGenerics_ISO()
94 dates.add(date); in test_date_comparator_checkGenerics_ISO()
95 dates.add(date.plus(1, ChronoUnit.DAYS)); in test_date_comparator_checkGenerics_ISO()
96 dates.add(date.plus(1, ChronoUnit.WEEKS)); in test_date_comparator_checkGenerics_ISO()
97 dates.add(date.plus(1, ChronoUnit.MONTHS)); in test_date_comparator_checkGenerics_ISO()
[all …]
/libcore/luni/src/test/java/libcore/java/time/chrono/
DJapaneseChronologyTest.java80 JapaneseDate date = JapaneseDate.now(); in test_JapaneseDate_isSupported_TemporalField() local
82 assertEquals(false, date.isSupported(ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH)); in test_JapaneseDate_isSupported_TemporalField()
83 assertEquals(false, date.isSupported(ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR)); in test_JapaneseDate_isSupported_TemporalField()
84 assertEquals(false, date.isSupported(ChronoField.ALIGNED_WEEK_OF_MONTH)); in test_JapaneseDate_isSupported_TemporalField()
85 assertEquals(false, date.isSupported(ChronoField.ALIGNED_WEEK_OF_YEAR)); in test_JapaneseDate_isSupported_TemporalField()
86 assertEquals(false, date.isSupported(ChronoField.AMPM_OF_DAY)); in test_JapaneseDate_isSupported_TemporalField()
87 assertEquals(false, date.isSupported(ChronoField.CLOCK_HOUR_OF_AMPM)); in test_JapaneseDate_isSupported_TemporalField()
88 assertEquals(false, date.isSupported(ChronoField.CLOCK_HOUR_OF_DAY)); in test_JapaneseDate_isSupported_TemporalField()
89 assertEquals(true, date.isSupported(ChronoField.DAY_OF_MONTH)); in test_JapaneseDate_isSupported_TemporalField()
90 assertEquals(true, date.isSupported(ChronoField.DAY_OF_WEEK)); in test_JapaneseDate_isSupported_TemporalField()
[all …]
DThaiBuddhistChronologyTest.java93 for (ThaiBuddhistDate date : dates) { in test_ThaiBuddhistDate_range()
95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH), in test_ThaiBuddhistDate_range()
96 date.range(ChronoField.DAY_OF_MONTH)); in test_ThaiBuddhistDate_range()
97 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_YEAR), in test_ThaiBuddhistDate_range()
98 date.range(ChronoField.DAY_OF_YEAR)); in test_ThaiBuddhistDate_range()
99 assertEquals(LocalDate.from(date).range(ChronoField.ALIGNED_WEEK_OF_MONTH), in test_ThaiBuddhistDate_range()
100 date.range(ChronoField.ALIGNED_WEEK_OF_MONTH)); in test_ThaiBuddhistDate_range()
115 ThaiBuddhistDate date = ThaiBuddhistDate.of(10, 2, 5); in test_ThaiBuddhistDate_getLong() local
116 assertEquals(10, date.getLong(ChronoField.YEAR_OF_ERA)); in test_ThaiBuddhistDate_getLong()
117 assertEquals(10, date.getLong(ChronoField.YEAR)); in test_ThaiBuddhistDate_getLong()
[all …]
DMinguoChronologyTest.java91 for (MinguoDate date : dates) { in test_MinguoDate_range()
93 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_MONTH), in test_MinguoDate_range()
94 date.range(ChronoField.DAY_OF_MONTH)); in test_MinguoDate_range()
95 assertEquals(LocalDate.from(date).range(ChronoField.DAY_OF_YEAR), in test_MinguoDate_range()
96 date.range(ChronoField.DAY_OF_YEAR)); in test_MinguoDate_range()
97 assertEquals(LocalDate.from(date).range(ChronoField.ALIGNED_WEEK_OF_MONTH), in test_MinguoDate_range()
98 date.range(ChronoField.ALIGNED_WEEK_OF_MONTH)); in test_MinguoDate_range()
113 MinguoDate date = MinguoDate.of(10, 2, 5); in test_MinguoDate_getLong() local
114 assertEquals(10, date.getLong(ChronoField.YEAR_OF_ERA)); in test_MinguoDate_getLong()
115 assertEquals(10, date.getLong(ChronoField.YEAR)); in test_MinguoDate_getLong()
[all …]
/libcore/ojluni/src/main/java/java/time/
DLocalDateTime.java155 private final LocalDate date; field in LocalDateTime
230 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() local
232 return new LocalDateTime(date, time); in of()
255 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() local
257 return new LocalDateTime(date, time); in of()
280 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() local
282 return new LocalDateTime(date, time); in of()
305 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() local
307 return new LocalDateTime(date, time); in of()
330 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() local
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/
DTestIsoChronology.java131 {IsoChronology.INSTANCE.date(1, 7, 8), LocalDate.of(1, 7, 8)}, in data_samples()
132 {IsoChronology.INSTANCE.date(1, 7, 20), LocalDate.of(1, 7, 20)}, in data_samples()
133 {IsoChronology.INSTANCE.date(1, 7, 21), LocalDate.of(1, 7, 21)}, in data_samples()
135 {IsoChronology.INSTANCE.date(2, 7, 8), LocalDate.of(2, 7, 8)}, in data_samples()
136 {IsoChronology.INSTANCE.date(3, 6, 27), LocalDate.of(3, 6, 27)}, in data_samples()
137 {IsoChronology.INSTANCE.date(3, 5, 23), LocalDate.of(3, 5, 23)}, in data_samples()
138 {IsoChronology.INSTANCE.date(4, 6, 16), LocalDate.of(4, 6, 16)}, in data_samples()
139 {IsoChronology.INSTANCE.date(4, 7, 3), LocalDate.of(4, 7, 3)}, in data_samples()
140 {IsoChronology.INSTANCE.date(4, 7, 4), LocalDate.of(4, 7, 4)}, in data_samples()
141 {IsoChronology.INSTANCE.date(5, 1, 1), LocalDate.of(5, 1, 1)}, in data_samples()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DSupport_SimpleDateFormat.java53 Date date = cal.getTime(); in t_format_with_FieldPosition() local
75 t_FormatWithField(0, format, date, null, Field.ERA, 0, 2); in t_format_with_FieldPosition()
76 t_FormatWithField(1, format, date, null, Field.YEAR, 6, 10); in t_format_with_FieldPosition()
77 t_FormatWithField(2, format, date, null, Field.MONTH, 19, 20); in t_format_with_FieldPosition()
78 t_FormatWithField(3, format, date, null, Field.DAY_OF_MONTH, 38, 40); in t_format_with_FieldPosition()
79 t_FormatWithField(4, format, date, null, Field.HOUR_OF_DAY1, 48, 50); in t_format_with_FieldPosition()
80 t_FormatWithField(5, format, date, null, Field.HOUR_OF_DAY0, 58, 60); in t_format_with_FieldPosition()
81 t_FormatWithField(6, format, date, null, Field.HOUR1, 68, 69); in t_format_with_FieldPosition()
82 t_FormatWithField(7, format, date, null, Field.MINUTE, 77, 79); in t_format_with_FieldPosition()
83 t_FormatWithField(8, format, date, null, Field.SECOND, 84, 85); in t_format_with_FieldPosition()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestReducedPrinter.java216 MinguoDate date = MinguoDate.of(109, 6, 30); in test_minguoChrono_fixedWidth() local
217 assertEquals(f.format(date), "09"); in test_minguoChrono_fixedWidth()
218 date = MinguoDate.of(110, 6, 30); in test_minguoChrono_fixedWidth()
219 assertEquals(f.format(date), "10"); in test_minguoChrono_fixedWidth()
220 date = MinguoDate.of(199, 6, 30); in test_minguoChrono_fixedWidth()
221 assertEquals(f.format(date), "99"); in test_minguoChrono_fixedWidth()
222 date = MinguoDate.of(200, 6, 30); in test_minguoChrono_fixedWidth()
223 assertEquals(f.format(date), "00"); in test_minguoChrono_fixedWidth()
224 date = MinguoDate.of(209, 6, 30); in test_minguoChrono_fixedWidth()
225 assertEquals(f.format(date), "09"); in test_minguoChrono_fixedWidth()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DOldDateFormatTest.java46 public StringBuffer format(Date date, StringBuffer toAppendTo, in format() argument
225 Date date = format.parse(format.format(current).toString()); in test_parseLString() local
226 assertEquals(current.getDate(), date.getDate()); in test_parseLString()
227 assertEquals(current.getDay(), date.getDay()); in test_parseLString()
228 assertEquals(current.getMonth(), date.getMonth()); in test_parseLString()
229 assertEquals(current.getYear(), date.getYear()); in test_parseLString()
230 assertEquals(current.getHours(), date.getHours()); in test_parseLString()
231 assertEquals(current.getMinutes(), date.getMinutes()); in test_parseLString()
232 assertEquals(0, date.getSeconds()); in test_parseLString()
258 Date date = format.parse(format.format(current).toString()); in test_parseLString() local
[all …]
/libcore/ojluni/src/main/java/java/util/
DDate.java177 public Date(long date) { in Date() argument
178 fastTime = date; in Date()
196 public Date(int year, int month, int date) { in Date() argument
197 this(year, month, date, 0, 0, 0); in Date()
219 public Date(int year, int month, int date, int hrs, int min) { in Date() argument
220 this(year, month, date, hrs, min, 0); in Date()
243 public Date(int year, int month, int date, int hrs, int min, int sec) { in Date() argument
255 cdate.setNormalizedDate(y, month + 1, date).setTimeOfDay(hrs, min, sec, 0); in Date()
317 public static long UTC(int year, int month, int date, in UTC() argument
331 udate.setNormalizedDate(y, m, date).setTimeOfDay(hrs, min, sec, 0); in UTC()
[all …]
/libcore/ojluni/src/main/java/sun/security/x509/
DInvalidityDateExtension.java69 private Date date; field in InvalidityDateExtension
72 if (date == null) { in encodeThis()
77 dos.putGeneralizedTime(date); in encodeThis()
87 public InvalidityDateExtension(Date date) throws IOException { in InvalidityDateExtension() argument
88 this(false, date); in InvalidityDateExtension()
97 public InvalidityDateExtension(boolean critical, Date date) in InvalidityDateExtension() argument
101 this.date = date; in InvalidityDateExtension()
119 this.date = val.getGeneralizedTime(); in InvalidityDateExtension()
130 date = (Date) obj; in set()
143 if (date == null) { in get()
[all …]
/libcore/ojluni/src/main/java/java/time/temporal/
DWeekFields.java726 ChronoLocalDate date = chrono.date(yowby, 1, 1); in ofWeekBasedYear() local
727 int ldow = localizedDayOfWeek(date); in ofWeekBasedYear()
731 int yearLen = date.lengthOfYear(); in ofWeekBasedYear()
736 return date.plus(days, DAYS); in ofWeekBasedYear()
845 ChronoLocalDate date = Chronology.from(temporal).date(temporal); in localizedWeekOfWeekBasedYear() local
846 date = date.minus(doy, DAYS); // Back down into previous year in localizedWeekOfWeekBasedYear()
847 return localizedWeekOfWeekBasedYear(date); in localizedWeekOfWeekBasedYear()
959 ChronoLocalDate date; in resolveWoM() local
961 date = chrono.date(year, 1, 1).plus(Math.subtractExact(month, 1), MONTHS); in resolveWoM()
962 long weeks = Math.subtractExact(wom, localizedWeekOfMonth(date)); in resolveWoM()
[all …]

1234567