Searched refs:fromordinal (Results 1 – 10 of 10) sorted by relevance
/external/python/dateutil/dateutil/ |
D | relativedelta.py | 109 dt1 = datetime.datetime.fromordinal(dt1.toordinal()) 111 dt2 = datetime.datetime.fromordinal(dt2.toordinal()) 351 other = datetime.datetime.fromordinal(other.toordinal())
|
D | rrule.py | 432 dtstart = datetime.datetime.fromordinal(dtstart.toordinal()) 448 until = datetime.datetime.fromordinal(until.toordinal()) 854 date = datetime.date.fromordinal(ii.yearordinal+i) 874 date = datetime.date.fromordinal(ii.yearordinal + i)
|
/external/python/cpython2/Lib/test/ |
D | test_datetime.py | 609 fromord = self.theclass.fromordinal(n) 625 d2 = self.theclass.fromordinal(n) 629 d = self.theclass.fromordinal(n-1) 644 self.assertEqual(d, self.theclass.fromordinal(n)) 651 b = a.fromordinal(aord) 654 self.assertRaises(ValueError, lambda: a.fromordinal(aord - 1)) 658 self.assertEqual(b, self.theclass.fromordinal(aord + 1)) 663 b = a.fromordinal(aord) 666 self.assertRaises(ValueError, lambda: a.fromordinal(aord + 1)) 670 self.assertEqual(b, self.theclass.fromordinal(aord - 1))
|
/external/python/cpython2/Lib/ |
D | _strptime.py | 461 … datetime_result = datetime_date.fromordinal((julian - 1) + datetime_date(year, 1, 1).toordinal())
|
/external/python/cpython3/Lib/ |
D | _strptime.py | 547 datetime_result = datetime_date.fromordinal(
|
D | datetime.py | 851 def fromordinal(cls, n): member in date 1017 return date.fromordinal(o) 2034 return datetime.combine(date.fromordinal(delta.days),
|
/external/python/cpython3/Lib/test/ |
D | datetimetester.py | 1020 fromord = self.theclass.fromordinal(n) 1036 d2 = self.theclass.fromordinal(n) 1040 d = self.theclass.fromordinal(n-1) 1055 self.assertEqual(d, self.theclass.fromordinal(n)) 1062 b = a.fromordinal(aord) 1065 self.assertRaises(ValueError, lambda: a.fromordinal(aord - 1)) 1069 self.assertEqual(b, self.theclass.fromordinal(aord + 1)) 1074 b = a.fromordinal(aord) 1077 self.assertRaises(ValueError, lambda: a.fromordinal(aord + 1)) 1081 self.assertEqual(b, self.theclass.fromordinal(aord - 1))
|
/external/python/cpython2/Doc/library/ |
D | datetime.rst | 380 .. classmethod:: date.fromordinal(ordinal) 384 date.max.toordinal()``. For any date *d*, ``date.fromordinal(d.toordinal()) == 496 ``date.fromordinal(d.toordinal()) == d``. 590 >>> d = date.fromordinal(730920) # 730920th day after 1. 1. 0001 710 .. classmethod:: datetime.fromordinal(ordinal)
|
/external/python/cpython3/Doc/library/ |
D | datetime.rst | 437 .. classmethod:: date.fromordinal(ordinal) 441 date.max.toordinal()``. For any date *d*, ``date.fromordinal(d.toordinal()) == 565 ``date.fromordinal(d.toordinal()) == d``. 661 >>> d = date.fromordinal(730920) # 730920th day after 1. 1. 0001 814 .. classmethod:: datetime.fromordinal(ordinal)
|
/external/python/cpython3/Doc/whatsnew/ |
D | 3.7.rst | 1829 :meth:`date.fromordinal` and :meth:`date.fromtimestamp` are now up to
|