Home
last modified time | relevance | path

Searched refs:date2 (Results 1 – 25 of 34) sorted by relevance

12

/external/python/pybind11/tests/
Dtest_chrono.py14 date2 = datetime.datetime.today()
20 diff_python = abs(date2 - date0)
21 diff = abs(date1 - date2)
35 date2 = m.test_chrono2(date1)
38 assert isinstance(date2, datetime.datetime)
41 diff = abs(date1 - date2)
52 date2 = datetime2.date()
57 assert isinstance(date2, datetime.date)
61 diff = abs(date1 - date2)
67 assert date1.year == date2.year
[all …]
/external/apache-commons-lang/src/test/java/org/apache/commons/lang3/time/
DDateUtilsTest.java131 private Date date2; field in DateUtilsTest
183 date2 = dateTimeParser.parse("November 18, 2001 1:23:11.321"); in setUp()
210 cal2.setTime(date2); in setUp()
414 DateUtils.ceiling(date2, Calendar.YEAR), in testCeil()
420 DateUtils.ceiling(date2, Calendar.MONTH), in testCeil()
426 DateUtils.ceiling(date2, DateUtils.SEMI_MONTH), in testCeil()
432 DateUtils.ceiling(date2, Calendar.DATE), in testCeil()
438 DateUtils.ceiling(date2, Calendar.HOUR), in testCeil()
444 DateUtils.ceiling(date2, Calendar.MINUTE), in testCeil()
450 DateUtils.ceiling(date2, Calendar.SECOND), in testCeil()
[all …]
DFastDatePrinterTest.java176 final Date date2 = cal2.getTime(); in testFormat() local
178 final long millis2 = date2.getTime(); in testFormat()
186 assertEquals("2003-07-10T09:00:00", fdf.format(date2)); in testFormat()
195 assertEquals("-0400", fdf.format(date2)); in testFormat()
204 assertEquals("-04:00", fdf.format(date2)); in testFormat()
214 … assertEquals(sdf.format(date2).replace("2003 03 03 03", "2003 2003 03 2003"), fdf.format(date2)); in testFormat()
/external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/file/common/
DGcParamTest.java42 Date date2 = new Date(2L); in expiresAt_shouldHaveExpiresAtTagAndExpiration() local
44 GcParam expiresAt2 = GcParam.expiresAt(date2); in expiresAt_shouldHaveExpiresAtTagAndExpiration()
53 assertThat(expiresAt2.getExpiration()).isEqualTo(date2); in expiresAt_shouldHaveExpiresAtTagAndExpiration()
/external/apache-commons-lang/src/main/java/org/apache/commons/lang3/time/
DDateUtils.java165 public static boolean isSameDay(final Date date1, final Date date2) { in isSameDay() argument
166 return isSameDay(toCalendar(date1), toCalendar(date2)); in isSameDay()
201 public static boolean isSameInstant(final Date date1, final Date date2) { in isSameInstant() argument
203 Objects.requireNonNull(date2, "date2"); in isSameInstant()
204 return date1.getTime() == date2.getTime(); in isSameInstant()
1670 public static boolean truncatedEquals(final Date date1, final Date date2, final int field) { in truncatedEquals() argument
1671 return truncatedCompareTo(date1, date2, field) == 0; in truncatedEquals()
1708 public static int truncatedCompareTo(final Date date1, final Date date2, final int field) { in truncatedCompareTo() argument
1710 final Date truncatedDate2 = truncate(date2, field); in truncatedCompareTo()
/external/icu/icu4c/source/samples/dtitvfmtsample/
Ddtitvfmtsample.cpp40 UDate date2 = cal->getTime(status); in dtitvfmtPreDefined() local
46 new DateInterval(date1,date2), in dtitvfmtPreDefined()
47 new DateInterval(date2,date3), in dtitvfmtPreDefined()
/external/cronet/third_party/icu/source/samples/dtitvfmtsample/
Ddtitvfmtsample.cpp40 UDate date2 = cal->getTime(status); in dtitvfmtPreDefined() local
46 new DateInterval(date1,date2), in dtitvfmtPreDefined()
47 new DateInterval(date2,date3), in dtitvfmtPreDefined()
/external/icu/icu4c/source/test/cintltst/
Dcdtdptst.c205 UDate date1, date2; in TestRunTogetherPattern985() local
219 date2 = udat_parse(format, now, u_strlen(now), &pos, &status); in TestRunTogetherPattern985()
220 if (date2 == 0) log_verbose("Parse stopped at : %d\n", pos); in TestRunTogetherPattern985()
221 else then=myDateFormat(format, date2); in TestRunTogetherPattern985()
223 if (!(date2 == date1)) log_err("FAIL\n"); in TestRunTogetherPattern985()
/external/cronet/third_party/icu/source/test/cintltst/
Dcdtdptst.c205 UDate date1, date2; in TestRunTogetherPattern985() local
219 date2 = udat_parse(format, now, u_strlen(now), &pos, &status); in TestRunTogetherPattern985()
220 if (date2 == 0) log_verbose("Parse stopped at : %d\n", pos); in TestRunTogetherPattern985()
221 else then=myDateFormat(format, date2); in TestRunTogetherPattern985()
223 if (!(date2 == date1)) log_err("FAIL\n"); in TestRunTogetherPattern985()
/external/pdfium/testing/resources/javascript/xfa_specific/
Dxfa_items.in30 <date name="date2">2039-12-01</date>
104 date2 = itemlist.resolveNode("date2");
105 expect("date2.value", "2039-12-01");
Dxfa_items_expected.txt55 Alert: PASS: date2.value = 2039-12-01
/external/mtools/
Ddirectory.c103 time_t date2 = date; in mk_entry() local
107 now = localtime(&date2); in mk_entry()
/external/cronet/components/cronet/android/test/javatests/src/org/chromium/net/
DMetricsTestUtil.java50 public static void assertAfter(Instant date1, Instant date2) { in assertAfter() argument
52 Instant date2Ms = date2.truncatedTo(MILLIS); in assertAfter()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/ser/jdk/
DAtomicTypeSerializationTest.java37 public AtomicReference<Date> date2; field in AtomicTypeSerializationTest.ContextualOptionals
121 input.date2 = new AtomicReference<>(new Date(0L)); in testContextualAtomicReference()
/external/cldr/tools/cldr-code/src/main/java/org/unicode/cldr/util/
DVerifyZones.java414 long date2 = getStandardDate(tz); in addZones() local
416 … String formattedZone = tzformatter.getFormattedZone(tzid, pattern.toString(), date2); in addZones()
427 date2 = date2 == date ? date6 : date; // reverse for final 2 items in addZones()
/external/apache-harmony/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/
DTimestampTest.java659 Date date2 = new Date(time);
660 Timestamp timestamp2 = new Timestamp(date2.getTime());
661 assertEquals(0, timestamp2.compareTo(date2));
/external/icu/icu4c/source/test/intltest/
Dcalregts.cpp1870 UDate date2 = calendar->getTime(status); in Test4165343() local
1873 logln(UnicodeString("after adding one year : ") + date2); in Test4165343()
1874 if (date1 == date2) { in Test4165343()
2339 UDate date2 = cal.getTime(ec); in TestJ438() local
2346 int32_t dy = cal.fieldDifference(date2, UCAL_YEAR, ec); in TestJ438()
2347 int32_t dm = cal.fieldDifference(date2, UCAL_MONTH, ec); in TestJ438()
2348 int32_t dd = cal.fieldDifference(date2, UCAL_DATE, ec); in TestJ438()
2358 int32_t dy2 = cal2->fieldDifference(date2, Calendar::YEAR, ec2); in TestJ438()
2359 int32_t dm2 = cal2->fieldDifference(date2, Calendar::MONTH, ec2); in TestJ438()
2360 int32_t dd2 = cal2->fieldDifference(date2, Calendar::DATE, ec2); in TestJ438()
[all …]
/external/cronet/third_party/icu/source/test/intltest/
Dcalregts.cpp1869 UDate date2 = calendar->getTime(status); in Test4165343() local
1872 logln(UnicodeString("after adding one year : ") + date2); in Test4165343()
1873 if (date1 == date2) { in Test4165343()
2338 UDate date2 = cal.getTime(ec); in TestJ438() local
2345 int32_t dy = cal.fieldDifference(date2, UCAL_YEAR, ec); in TestJ438()
2346 int32_t dm = cal.fieldDifference(date2, UCAL_MONTH, ec); in TestJ438()
2347 int32_t dd = cal.fieldDifference(date2, UCAL_DATE, ec); in TestJ438()
2357 int32_t dy2 = cal2->fieldDifference(date2, Calendar::YEAR, ec2); in TestJ438()
2358 int32_t dm2 = cal2->fieldDifference(date2, Calendar::MONTH, ec2); in TestJ438()
2359 int32_t dd2 = cal2->fieldDifference(date2, Calendar::DATE, ec2); in TestJ438()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/calendar/
DCalendarRegressionTest.java1266 Date date2 = calendar.getTime(); in Test4165343() local
1267 logln("after adding one year : " + date2); in Test4165343()
1268 if (date1.equals(date2)) { in Test4165343()
1790 Date date2 = cal.getTime();
1793 int dy = cal.fieldDifference(date2, Calendar.YEAR);
1794 int dm = cal.fieldDifference(date2, Calendar.MONTH);
1795 int dd = cal.fieldDifference(date2, Calendar.DATE);
1797 logln("" + date2 + " - " + date1 + " = " +
1805 if (!date2.equals(date22)) {
1808 date22 + ", exp " + date2);
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/
DCalendarRegressionTest.java1263 Date date2 = calendar.getTime(); in Test4165343() local
1264 logln("after adding one year : " + date2); in Test4165343()
1265 if (date1.equals(date2)) { in Test4165343()
1787 Date date2 = cal.getTime();
1790 int dy = cal.fieldDifference(date2, Calendar.YEAR);
1791 int dm = cal.fieldDifference(date2, Calendar.MONTH);
1792 int dd = cal.fieldDifference(date2, Calendar.DATE);
1794 logln("" + date2 + " - " + date1 + " = " +
1802 if (!date2.equals(date22)) {
1805 date22 + ", exp " + date2);
/external/python/cpython2/Doc/library/
Ddatetime.rst428 | ``date2 = date1 + timedelta`` | *date2* is ``timedelta.days`` days removed |
431 | ``date2 = date1 - timedelta`` | Computes *date2* such that ``date2 + |
434 | ``timedelta = date1 - date2`` | \(3) |
436 | ``date1 < date2`` | *date1* is considered less than *date2* when |
437 | | *date1* precedes *date2* in time. (4) |
443 *date2* is moved forward in time if ``timedelta.days > 0``, or backward if
444 ``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``.
446 :exc:`OverflowError` is raised if ``date2.year`` would be smaller than
456 timedelta.microseconds are 0, and date2 + timedelta == date1 after.
459 In other words, ``date1 < date2`` if and only if ``date1.toordinal() <
[all …]
/external/javaparser/javaparser-core-testing-bdd/src/test/resources/com/github/javaparser/
Dparsing_scenarios.story289 (Comparator<ChronoLocalDate>) (date1, date2) -> {
290 return Long.compare(date1.toEpochDay(), date2.toEpochDay());
302 (Comparator<ChronoLocalDate> & Serializable) (date1, date2) -> {
303 return Long.compare(date1.toEpochDay(), date2.toEpochDay());
/external/python/cpython3/Doc/library/
Ddatetime.rst584 | ``date2 = date1 + timedelta`` | *date2* is ``timedelta.days`` days removed |
587 | ``date2 = date1 - timedelta`` | Computes *date2* such that ``date2 + |
590 | ``timedelta = date1 - date2`` | \(3) |
592 | ``date1 < date2`` | *date1* is considered less than *date2* when |
593 | | *date1* precedes *date2* in time. (4) |
599 *date2* is moved forward in time if ``timedelta.days > 0``, or backward if
600 ``timedelta.days < 0``. Afterward ``date2 - date1 == timedelta.days``.
602 :exc:`OverflowError` is raised if ``date2.year`` would be smaller than
610 timedelta.microseconds are 0, and date2 + timedelta == date1 after.
613 In other words, ``date1 < date2`` if and only if ``date1.toordinal() <
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DDateIntervalFormatTest.java1506 … long date2 = 1299115800000L; // 2011-Mar-02 1730 in US/Pacific, 2011-Mar-03 1030 in Asia/Tokyo in TestGetSetTimeZone() local
1507 DateInterval dtitv = new DateInterval(date1, date2); in TestGetSetTimeZone()
1633 long date2 = 1299115800000L; in TestDateIntervalFormatCoverage() local
1634 DateInterval dtitv = new DateInterval(date1, date2); in TestDateIntervalFormatCoverage()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DDateIntervalFormatTest.java1503 … long date2 = 1299115800000L; // 2011-Mar-02 1730 in US/Pacific, 2011-Mar-03 1030 in Asia/Tokyo in TestGetSetTimeZone() local
1504 DateInterval dtitv = new DateInterval(date1, date2); in TestGetSetTimeZone()
1630 long date2 = 1299115800000L; in TestDateIntervalFormatCoverage() local
1631 DateInterval dtitv = new DateInterval(date1, date2); in TestDateIntervalFormatCoverage()

12