/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
H A D | TCKJulianFields.java | 128 public void test_samples_get(TemporalField field, LocalDate date, long expected) { argument 129 assertEquals(date.getLong(field), expected); 133 public void test_samples_set(TemporalField field, LocalDate date, long value) { argument 134 assertEquals(field.adjustInto(LocalDate.MAX, value), date); 135 assertEquals(field.adjustInto(LocalDate.MIN, value), date); 136 assertEquals(field.adjustInto(JAN01_1970, value), date); 137 assertEquals(field.adjustInto(DEC31_1969, value), date); 138 assertEquals(field.adjustInto(NOV12_1945, value), date); 143 public void test_samples_parse_STRICT(TemporalField field, LocalDate date, long value) { argument 147 assertEquals(parsed, date); 151 test_samples_parse_SMART(TemporalField field, LocalDate date, long value) argument 159 test_samples_parse_LENIENT(TemporalField field, LocalDate date, long value) argument [all...] |
H A D | TCKIsoFields.java | 124 public void test_DOQ(LocalDate date, int doq, int qoy) { argument 125 assertEquals(IsoFields.DAY_OF_QUARTER.getFrom(date), doq); 126 assertEquals(date.get(IsoFields.DAY_OF_QUARTER), doq); 138 public void test_QOY(LocalDate date, int doq, int qoy) { argument 139 assertEquals(IsoFields.QUARTER_OF_YEAR.getFrom(date), qoy); 140 assertEquals(date.get(IsoFields.QUARTER_OF_YEAR), qoy); 152 public void test_parse_quarters(LocalDate date, int doq, int qoy) { argument 158 LocalDate parsed = LocalDate.parse(date.getYear() + "-" + qoy + "-" + doq, f); 159 assertEquals(parsed, date); 163 public void test_parse_quarters_SMART(LocalDate date, in argument 174 test_parse_quarters_LENIENT(LocalDate date, int doq, int qoy) argument 321 test_WOWBY(LocalDate date, DayOfWeek dow, int week, int wby) argument 336 test_WBY(LocalDate date, DayOfWeek dow, int week, int wby) argument 351 test_parse_weeks_STRICT(LocalDate date, DayOfWeek dow, int week, int wby) argument 362 test_parse_weeks_SMART(LocalDate date, DayOfWeek dow, int week, int wby) argument 373 test_parse_weeks_LENIENT(LocalDate date, DayOfWeek dow, int week, int wby) argument [all...] |
/libcore/ojluni/src/main/java/java/time/temporal/ |
H A D | WeekFields.java | 219 * This allows a number of week-based-years to be added to, or subtracted from, a date. 452 * In the resolving phase of parsing, a date can be created from a year, 461 * is validated from 0 to 6, meaning that the resulting date can be in a 465 * are validated against the range of valid values. The resulting date is calculated 467 * First, create a date on the first day of the first week of January in the requested year. 468 * Then take the month-of-year, subtract one, and add the amount in months to the date. 469 * Then take the week-of-month, subtract one, and add the amount in weeks to the date. 498 * In the resolving phase of parsing, a date can be created from a year, 507 * is validated from 0 to 54, meaning that the resulting date can be in a 511 * are validated against the range of valid values. The resulting date i [all...] |
H A D | IsoFields.java | 101 * The complete date is expressed using three fields: 111 * alternate way of expressing the date, based on the concept of week-based-year. 113 * The date is expressed using three fields: 171 * In the resolving phase of parsing, a date can be created from a year, 181 * If the day-of-quarter exceeds the actual range by one day, then the resulting date 183 * then the resulting date is two days later. 186 * against the range of valid values. The resulting date is calculated equivalent to 187 * the following three stage approach. First, create a date on the first of January 189 * amount in quarters to the date. Finally, take the day-of-quarter, subtract one, 190 * and add the amount in days to the date 585 getWeekRange(LocalDate date) argument 599 getWeek(LocalDate date) argument 621 getWeekBasedYear(LocalDate date) argument [all...] |
/libcore/ojluni/src/main/java/java/util/ |
H A D | Date.java | 50 * of date strings. Unfortunately, the API for these functions was not 54 * parse date strings. 81 * corrections applied. There are other time and date systems as 97 * year, month, date, hours, minutes, and seconds values, the 104 * <li>A date (day of month) is represented by an integer from 1 to 31 115 * minute, but this specification follows the date and time conventions 120 * not fall within the indicated ranges; for example, a date may be 174 * @param date the milliseconds since January 1, 1970, 00:00:00 GMT. 177 public Date(long date) { argument 178 fastTime = date; 196 Date(int year, int month, int date) argument 219 Date(int year, int month, int date, int hrs, int min) argument 243 Date(int year, int month, int date, int hrs, int min, int sec) argument 317 UTC(int year, int month, int date, int hrs, int min, int sec) argument 776 setDate(int date) argument 978 getMillisOf(Date date) argument 1237 normalize(BaseCalendar.Date date) argument [all...] |
H A D | JapaneseImperialCalendar.java | 103 private static final int EPOCH_OFFSET = 719163; // Fixed date of January 1, 1970 (Gregorian) 132 // Fixed date of the first date of each era. 245 CalendarDate date = gcal.newCalendarDate(TimeZone.NO_TIMEZONE); 249 date.setDate(transitionDate.getYear(), BaseCalendar.JANUARY, 1); 250 long fdd = gcal.getFixedDate(date); 254 date.setDate(transitionDate.getYear(), BaseCalendar.DECEMBER, 31); 255 fdd = gcal.getFixedDate(date); 377 * @param amount the amount of date or time to be added to the field. 476 // Translate the current time to the fixed date an 1494 getYearOffsetInMillis(CalendarDate date) argument 2107 getFixedDateJan1(LocalGregorianCalendar.Date date, long fixedDate) argument 2133 getFixedDateMonth1(LocalGregorianCalendar.Date date, long fixedDate) argument 2206 getTransitionEraIndex(LocalGregorianCalendar.Date date) argument 2236 getEraIndex(LocalGregorianCalendar.Date date) argument 2270 pinDayOfMonth(LocalGregorianCalendar.Date date) argument [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
H A D | TestIsoWeekFields.java | 138 LocalDate date = LocalDate.of(2011, 1, 3); 143 assertEquals(yearField.getFrom(date), wby); 144 assertEquals(weekField.getFrom(date), week); 145 assertEquals(DAY_OF_WEEK.getFrom(date), dow); 156 date = date.plusDays(1); 158 assertEquals(yearField.getFrom(date), 2017); 159 assertEquals(weekField.getFrom(date), 1); 160 assertEquals(DAY_OF_WEEK.getFrom(date), 1); 166 LocalDate date [all...] |
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
H A D | TestUmmAlQuraChronology.java | 113 // Test to verify the epoch days for given Hijrah & ISO date instances 116 assertEquals(hd.toEpochDay(), ld.toEpochDay(), "Umm alQura date and ISO date should have same epochDay"); 158 public void Test_UmmAlQuraRanges(HijrahDate date, argument 163 HijrahChronology chrono = date.getChronology(); 178 // Check the date ranges 179 yearRange = date.range(YEAR); 180 assertEquals(yearRange.getMinimum(), minYear, "Minimum year for Hijrah date"); 181 assertEquals(yearRange.getLargestMinimum(), minYear, "Largest minimum year for Hijrah date"); 182 assertEquals(yearRange.getMaximum(), maxYear, "Maximum year for Hijrah date"); 486 test_dayOfWeek(HijrahDate date, int satStart, int sunStart) argument [all...] |
H A D | TestExampleCode.java | 88 // Print the Thai Buddhist date 100 ChronoLocalDate date = chrono.dateNow(); 101 System.out.printf(" %20s: %s%n", chrono.getId(), date.toString()); 104 // Print today's date and the last day of the year for the Thai Buddhist Calendar. 144 ChronoLocalDate date = chrono.dateNow(); 145 System.out.printf(" %20s: %s%n", chrono.getId(), date.toString()); 148 // Print the Thai Buddhist date 157 // Print today's date and the last day of the year for the Thai Buddhist Calendar. 169 HijrahDate hd2 = HijrahChronology.INSTANCE.date(1200, 1, 1); 181 ChronoLocalDate date 203 next(D date) argument 215 tomorrowNoon(D date) argument [all...] |
/libcore/luni/src/test/java/libcore/java/text/ |
H A D | OldDateFormatTest.java | 46 public StringBuffer format(Date date, StringBuffer toAppendTo, argument 96 assertTrue("Incorrect date format", sdf.format(current).equals(dtf)); 118 assertTrue("Incorrect date format", sdf.format(current).equals( 225 Date date = format.parse(format.format(current).toString()); 226 assertEquals(current.getDate(), date.getDate()); 227 assertEquals(current.getDay(), date.getDay()); 228 assertEquals(current.getMonth(), date.getMonth()); 229 assertEquals(current.getYear(), date.getYear()); 230 assertEquals(current.getHours(), date.getHours()); 231 assertEquals(current.getMinutes(), date [all...] |
/libcore/ojluni/src/main/java/java/time/ |
H A D | LocalDateTime.java | 101 * A date-time without a time-zone in the ISO-8601 calendar system, 104 * {@code LocalDateTime} is an immutable date-time object that represents a date-time, 105 * often viewed as year-month-day-hour-minute-second. Other date and time fields, 112 * Instead, it is a description of the date, as used for birthdays, combined with 134 * This is the local date-time of midnight at the start of the minimum date. 136 * This could be used by an application as a "far past" date-time. 141 * This is the local date-time just before midnight at the end of the maximum date 155 private final LocalDate date; field in class:LocalDateTime 367 of(LocalDate date, LocalTime time) argument 496 LocalDateTime(LocalDate date, LocalTime time) argument [all...] |
/libcore/ojluni/src/main/java/sun/security/provider/certpath/ |
H A D | CertPathHelper.java | 60 protected abstract void implSetDateAndTime(X509CRLSelector sel, Date date, long skew); argument 67 public static void setDateAndTime(X509CRLSelector sel, Date date, long skew) { argument 68 instance.implSetDateAndTime(sel, date, skew);
|
/libcore/ojluni/src/main/java/java/security/cert/ |
H A D | CertPathHelperImpl.java | 63 protected void implSetDateAndTime(X509CRLSelector sel, Date date, long skew) { argument 64 sel.setDateAndTime(date, skew);
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
H A D | TCKChronoLocalDateTime.java | 116 ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON); 119 ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); 132 assertEquals(result, cdt2, "WithAdjuster failed to replace date"); 140 ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON); 143 ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); 156 assertEquals(result, cdt2, "WithAdjuster failed to replace date time"); 164 ChronoLocalDateTime<?> cdt = chrono.date(refDate).atTime(LocalTime.NOON); 167 ChronoLocalDateTime<?> cdt2 = chrono2.date(refDate).atTime(LocalTime.NOON); 180 assertEquals(result, cdt2, "WithAdjuster failed to replace date"); 188 ChronoLocalDateTime<?> cdt = chrono.date(refDat [all...] |
H A D | TCKChronoZonedDateTime.java | 118 ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); 121 ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); 133 assertEquals(result, czdt2, "WithAdjuster failed to replace date"); 141 ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); 144 ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); 157 assertEquals(result, czdt2, "WithAdjuster failed to replace date time"); 165 ChronoZonedDateTime<?> czdt = chrono.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); 168 ChronoZonedDateTime<?> czdt2 = chrono2.date(refDate).atTime(LocalTime.NOON).atZone(ZoneOffset.UTC); 181 assertEquals(result, czdt2, "WithAdjuster failed to replace date"); 189 ChronoZonedDateTime<?> czdt = chrono.date(refDat [all...] |
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | ChronoLocalDateTimeImpl.java | 84 * A date-time without a time-zone for the calendar neutral API. 86 * {@code ChronoLocalDateTime} is an immutable date-time object that represents a date-time, often 90 * This class stores all date and time fields, to a precision of nanoseconds. 97 * @param <D> the concrete type for the date of this date-time 157 * The date part. 159 private final transient D date; field in class:ChronoLocalDateTimeImpl 167 * Obtains an instance of {@code ChronoLocalDateTime} from a date and time. 169 * @param date th 173 of(R date, LocalTime time) argument 202 ChronoLocalDateTimeImpl(D date, LocalTime time) argument [all...] |
H A D | AbstractChronology.java | 111 * The main date and time API is built on the ISO calendar system. 361 * Resolves parsed {@code ChronoField} values into a date during parsing. 366 * As such, {@code ChronoField} date fields are resolved here in the 372 * <li>{@code EPOCH_DAY} - If present, this is converted to a date and 373 * all other date fields are then cross-checked against the date. 385 * If all three are present, then they are combined to form a date. 388 * If the mode is lenient, then the date is combined in a manner equivalent to 389 * creating a date on the first day of the first month in the requested year, 393 * If the mode is strict, then the three fields must form a valid date [all...] |
/libcore/ojluni/src/main/java/sun/util/calendar/ |
H A D | LocalGregorianCalendar.java | 204 public Date getCalendarDate(long millis, CalendarDate date) { argument 205 Date ldate = (Date) super.getCalendarDate(millis, date); 240 public boolean validate(CalendarDate date) { argument 241 Date ldate = (Date) date; 248 Date tmp = newCalendarDate(date.getZone()); 249 tmp.setEra(era).setDate(date.getYear(), date.getMonth(), date.getDayOfMonth()); 255 if (date.getYear() >= eras[0].getSinceDate().getYear()) { 273 public boolean normalize(CalendarDate date) { argument 346 normalizeMonth(CalendarDate date) argument 351 normalizeYear(CalendarDate date) argument 379 getCalendarDateFromFixedDate(CalendarDate date, long fixedDate) argument [all...] |
H A D | Gregorian.java | 72 public Date getCalendarDate(long millis, CalendarDate date) { argument 73 return (Date) super.getCalendarDate(millis, date);
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
H A D | TCKLocalizedFieldPrinter.java | 99 LocalDate date = LocalDate.of(2012, 7, 20); 101 String result = b.toFormatter(locale).format(date); 123 public void test_print_WeekBasedYear(String pattern, String expectedText, LocalDate date) { argument 125 String result = dtf.format(date);
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
H A D | TestLocalDate.java | 96 private LocalDate next(LocalDate date) { argument 97 int newDayOfMonth = date.getDayOfMonth() + 1; 98 if (newDayOfMonth <= date.getMonth().length(isIsoLeap(date.getYear()))) { 99 return date.withDayOfMonth(newDayOfMonth); 101 date = date.withDayOfMonth(1); 102 if (date.getMonth() == Month.DECEMBER) { 103 date = date 108 previous(LocalDate date) argument [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/ |
H A D | TCKPeriod.java | 1033 {pymd(0, 0, 0), date(2012, 6, 30), date(2012, 6, 30)}, 1035 {pymd(1, 0, 0), date(2012, 6, 10), date(2013, 6, 10)}, 1036 {pymd(0, 1, 0), date(2012, 6, 10), date(2012, 7, 10)}, 1037 {pymd(0, 0, 1), date(2012, 6, 10), date(2012, 6, 11)}, 1039 {pymd(-1, 0, 0), date(2012, 6, 10), date(201 1267 private static LocalDate date(int y, int m, int d) { method in class:TCKPeriod [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/serial/ |
H A D | TCKCopticSerialization.java | 78 ChronoLocalDate copticDate = chrono.date(1729, 4, 27);
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
H A D | TestNonIsoFormatter.java | 78 { JAPANESE, Locale.JAPANESE, Locale.JAPANESE, JAPANESE.date(IsoDate), 82 { HIJRAH, ARABIC, ARABIC, HIJRAH.date(IsoDate), 85 { HIJRAH, ARABIC, Locale.ENGLISH, HIJRAH.date(IsoDate), 88 { MINGUO, Locale.TAIWAN, Locale.TAIWAN, MINGUO.date(IsoDate), 90 { BUDDHIST, thTH, thTH, BUDDHIST.date(IsoDate), 94 { BUDDHIST, thTH, thTHTH, BUDDHIST.date(IsoDate), 139 ChronoLocalDate date, String expected) { 143 String text = dtf.format(date); 154 ChronoLocalDate date = chrono.date(tempora 138 test_formatLocalizedDate(Chronology chrono, Locale formatLocale, Locale numberingLocale, ChronoLocalDate date, String expected) argument [all...] |
H A D | TestReducedParser.java | 393 {IsoChronology.INSTANCE.date(baseYear)}, 394 {IsoChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, 395 {IsoChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, 396 {HijrahChronology.INSTANCE.date(baseYear)}, 397 {HijrahChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, 398 {HijrahChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, 399 {JapaneseChronology.INSTANCE.date(baseYear)}, 400 {JapaneseChronology.INSTANCE.date(baseYear).plus(1, YEARS)}, 401 {JapaneseChronology.INSTANCE.date(baseYear).plus(99, YEARS)}, 402 {MinguoChronology.INSTANCE.date(baseYea 412 test_reducedWithChronoYear(ChronoLocalDate date) argument 430 test_reducedWithChronoYearOfEra(ChronoLocalDate date) argument [all...] |