woom.util.WoomDate.fromordinal

woom.util.WoomDate.fromordinal#

classmethod WoomDate.fromordinal(ordinal, tz=None)#

Construct a timestamp from a a proleptic Gregorian ordinal.

Parameters:
  • ordinal (int) – Date corresponding to a proleptic Gregorian ordinal.

  • tz (str, pytz.timezone, dateutil.tz.tzfile or None) – Time zone for the Timestamp.

Notes

By definition there cannot be any tz info on the ordinal itself.

Examples

>>> pd.Timestamp.fromordinal(737425)
Timestamp('2020-01-01 00:00:00')