Construct a date from a POSIX timestamp (like time.time()).
(cls, t)
| 1014 | |
| 1015 | @classmethod |
| 1016 | def fromtimestamp(cls, t): |
| 1017 | "Construct a date from a POSIX timestamp (like time.time())." |
| 1018 | if t is None: |
| 1019 | raise TypeError("'NoneType' object cannot be interpreted as an integer") |
| 1020 | y, m, d, hh, mm, ss, weekday, jday, dst = _time.localtime(t) |
| 1021 | return cls(y, m, d) |
| 1022 | |
| 1023 | @classmethod |
| 1024 | def today(cls): |