MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / fromordinal

Method fromordinal

tools/python-3.11.9-amd64/Lib/datetime.py:970–977  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

968
969 @classmethod
970 def fromordinal(cls, n):
971 """Construct a date from a proleptic Gregorian ordinal.
972
973 January 1 of year 1 is day 1. Only the year, month and day are
974 non-zero in the result.
975 """
976 y, m, d = _ord2ymd(n)
977 return cls(y, m, d)
978
979 @classmethod
980 def fromisoformat(cls, date_string):

Callers 3

_strptimeFunction · 0.80
__add__Method · 0.80
__add__Method · 0.80

Calls 1

_ord2ymdFunction · 0.85

Tested by

no test coverage detected