Construct a date from a POSIX timestamp (like time.time()).
(cls, t)
| 1023 | |
| 1024 | @classmethod |
| 1025 | def fromtimestamp(cls, t): |
| 1026 | "Construct a date from a POSIX timestamp (like time.time())." |
| 1027 | if t is None: |
| 1028 | raise TypeError("'NoneType' object cannot be interpreted as an integer") |
| 1029 | y, m, d, hh, mm, ss, weekday, jday, dst = _time.localtime(t) |
| 1030 | return cls(y, m, d) |
| 1031 | |
| 1032 | @classmethod |
| 1033 | def today(cls): |