Construct a date from a proleptic Gregorian ordinal. January 1 of year 1 is day 1. Only the year, month and day are non-zero in the result.
(cls, n)
| 1037 | |
| 1038 | @classmethod |
| 1039 | def fromordinal(cls, n): |
| 1040 | """Construct a date from a proleptic Gregorian ordinal. |
| 1041 | |
| 1042 | January 1 of year 1 is day 1. Only the year, month and day are |
| 1043 | non-zero in the result. |
| 1044 | """ |
| 1045 | y, m, d = _ord2ymd(n) |
| 1046 | return cls(y, m, d) |
| 1047 | |
| 1048 | @classmethod |
| 1049 | def fromisoformat(cls, date_string): |