Searched refs:toordinal (Results 1 – 13 of 13) sorted by relevance
/external/python/cpython3/Lib/ |
D | _strptime.py | 303 ordinal += datetime_date(iso_year, 1, 1).toordinal() 305 ordinal -= datetime_date(iso_year, 1, 1).toordinal() 534 julian = datetime_date(year, month, day).toordinal() - \ 535 datetime_date(year, 1, 1).toordinal() + 1 540 datetime_date(year, 1, 1).toordinal())
|
D | datetime.py | 952 weekday = self.toordinal() % 7 or 7 1006 def toordinal(self): member in date 1068 o = self.toordinal() + other.days 1081 days1 = self.toordinal() 1082 days2 = other.toordinal() 1088 return (self.toordinal() + 6) % 7 1095 return self.toordinal() % 7 or 7 1920 weekday = self.toordinal() % 7 or 7 2104 delta = timedelta(self.toordinal(), 2128 days1 = self.toordinal() [all …]
|
D | calendar.py | 652 _EPOCH_ORD = datetime.date(EPOCH, 1, 1).toordinal() 658 days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
|
/external/python/cpython2/Lib/ |
D | _strptime.py | 457 julian = datetime_date(year, month, day).toordinal() - \ 458 datetime_date(year, 1, 1).toordinal() + 1 461 … datetime_result = datetime_date.fromordinal((julian - 1) + datetime_date(year, 1, 1).toordinal())
|
D | calendar.py | 608 _EPOCH_ORD = datetime.date(EPOCH, 1, 1).toordinal() 614 days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
|
/external/python/cpython2/Lib/test/ |
D | test_datetime.py | 608 self.assertEqual(n, d.toordinal()) 624 n = d.toordinal() 632 self.assertEqual(d2.toordinal(), n-1) 637 n = self.theclass(year, 1, 1).toordinal() 643 self.assertEqual(d.toordinal(), n) 650 aord = a.toordinal() 657 self.assertEqual(b.toordinal(), aord + 1) 662 aord = a.toordinal() 669 self.assertEqual(b.toordinal(), aord - 1) 1150 self.assertEqual(dt1.toordinal(), dt2.toordinal()) [all …]
|
/external/python/dateutil/dateutil/ |
D | relativedelta.py | 123 dt1 = datetime.datetime.fromordinal(dt1.toordinal()) 125 dt2 = datetime.datetime.fromordinal(dt2.toordinal()) 365 other = datetime.datetime.fromordinal(other.toordinal())
|
D | rrule.py | 441 dtstart = datetime.datetime.fromordinal(dtstart.toordinal()) 457 until = datetime.datetime.fromordinal(until.toordinal()) 1129 self.yearordinal = firstyday.toordinal() 1245 eyday = easter.easter(year).toordinal()-self.yearordinal 1265 i = datetime.date(year, month, day).toordinal()-self.yearordinal 1279 i = datetime.date(year, month, day).toordinal() - self.yearordinal
|
/external/python/cpython2/Doc/library/ |
D | datetime.rst | 384 date.max.toordinal()``. For any date *d*, ``date.fromordinal(d.toordinal()) == 459 In other words, ``date1 < date2`` if and only if ``date1.toordinal() < 460 date2.toordinal()``. In order to stop comparison from falling back to the 487 d.weekday(), yday, -1))``, where ``yday = d.toordinal() - date(d.year, 1, 488 1).toordinal() + 1`` is the day number within the current year starting with 492 .. method:: date.toordinal() 496 ``date.fromordinal(d.toordinal()) == d``. 714 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and 969 d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` is the day number within 991 .. method:: datetime.toordinal() [all …]
|
/external/python/cpython3/Lib/zoneinfo/ |
D | _zoneinfo.py | 12 EPOCHORDINAL = datetime(1970, 1, 1).toordinal() 187 (dt.toordinal() - EPOCHORDINAL) * 86400
|
/external/python/cpython3/Lib/test/ |
D | datetimetester.py | 1123 self.assertEqual(n, d.toordinal()) 1139 n = d.toordinal() 1147 self.assertEqual(d2.toordinal(), n-1) 1152 n = self.theclass(year, 1, 1).toordinal() 1158 self.assertEqual(d.toordinal(), n) 1165 aord = a.toordinal() 1172 self.assertEqual(b.toordinal(), aord + 1) 1177 aord = a.toordinal() 1184 self.assertEqual(b.toordinal(), aord - 1) 1729 self.assertEqual(dt1.toordinal(), dt2.toordinal()) [all …]
|
/external/python/cpython3/Doc/library/ |
D | datetime.rst | 514 date.max.toordinal()``. For any date *d*, 515 ``date.fromordinal(d.toordinal()) == d``. 610 In other words, ``date1 < date2`` if and only if ``date1.toordinal() < 611 date2.toordinal()``. Date comparison raises :exc:`TypeError` if 647 where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` 651 .. method:: date.toordinal() 655 ``date.fromordinal(d.toordinal()) == d``. 964 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and 1316 where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` 1347 .. method:: datetime.toordinal() [all …]
|
/external/python/dateutil/dateutil/tz/ |
D | tz.py | 38 EPOCHORDINAL = EPOCH.toordinal()
|