Searched refs:toordinal (Results 1 – 6 of 6) sorted by relevance
/third_party/python/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 | 921 weekday = self.toordinal() % 7 or 7 975 def toordinal(self): member in date 1037 o = self.toordinal() + other.days 1050 days1 = self.toordinal() 1051 days2 = other.toordinal() 1057 return (self.toordinal() + 6) % 7 1064 return self.toordinal() % 7 or 7 1889 weekday = self.toordinal() % 7 or 7 2073 delta = timedelta(self.toordinal(), 2097 days1 = self.toordinal() [all …]
|
D | calendar.py | 639 _EPOCH_ORD = datetime.date(EPOCH, 1, 1).toordinal() 645 days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1
|
/third_party/python/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 …]
|
/third_party/python/Lib/zoneinfo/ |
D | _zoneinfo.py | 12 EPOCHORDINAL = datetime(1970, 1, 1).toordinal() 187 (dt.toordinal() - EPOCHORDINAL) * 86400
|
/third_party/python/Doc/library/ |
D | datetime.rst | 517 date.max.toordinal()``. For any date *d*, 518 ``date.fromordinal(d.toordinal()) == d``. 613 In other words, ``date1 < date2`` if and only if ``date1.toordinal() < 614 date2.toordinal()``. Date comparison raises :exc:`TypeError` if 650 where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` 654 .. method:: date.toordinal() 658 ``date.fromordinal(d.toordinal()) == d``. 967 <= ordinal <= datetime.max.toordinal()``. The hour, minute, second and 1319 where ``yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1`` 1350 .. method:: datetime.toordinal() [all …]
|