stems.times module

Module for handling dates and times

stems.times.datetime64_to_ordinal(x, name=None)[source]

Convert datetime to ordinal

stems.times.datetime64_to_ordinal_pd(x, name=None)[source]
stems.times.datetime64_to_pydatetime(x)[source]

Convert datetime64 to Python datetime.datetime

stems.times.datetime64_to_strftime(time, strf='%Y%m%d', cast=<class 'numpy.int32'>, fill=-9999)[source]

Convert time data to some string format (e.g., 20000101) :param time: Array of time data :type time: array-like :param strf: String format to be used with strftime :type strf: str, optional :param cast: Function to cast the string format to a number :type cast: callable :param fill: Fill value to use when time is NaN or NaT :type fill: int or float

Returns

Ordinal date formatted into a date string numeric representation

Return type

array-like

stems.times.ordinal_to_datetime64(x)[source]

Convert ordinal to datetime64, handling NaN/NaT