Time helpers and conversions (times)ΒΆ

Helper functions to convert arrays containing time information. All the functions with a 2 in the name provide the advertised conversions for scalar as well as for array input.

cwr2datetime

Converts a CWR-timesting into a datetime object.

cwr2str

Converts a CWR-timestring into a human-readable timestring.

cwr2unix

Converts a CWR-timestring to a unix timestamp.

datetime2doy

Extracts the day of year as a float from the given datetimes.

datetime2ordinal

Converts a datetime object into an ordinal.

datetime2str

Converts a datetime object into a human-readable string.

datetime2unix

Converts a dateime object into a unix-timestamp.

doy2datetime

Constructs a datetime object from given day of year.

iso2datetime

Converts an ISO formated time string to a datetime object.

iso2unix

Converts an ISO formated time string to a unix time stamp.

ordinal2datetime

Converts an ordinal to a datetime object.

str2datetime

Converts a human readable time string tinto a datetime object.

str2ordinal

Converts a human readable time string to an ordinal.

str2unix

Converts a time-string of the given d_format (default: "dd.mm.yyyy HH:MM:SS") into a unix-timestamp.

unix2cwr

Converts a unix-timestamp to a CWR-timestring.

unix2datetime

Convert a unix time stamp to a datetime object.

unix2ordinal

Converts a unix time stamp to an ordinal.

unix2str

Converts a unix-timestamp into a time-string of the given d_format (default: "dd.mm.yyyy HH:MM:SS").

time_part

Returns the "time_part" of a timestamp or datetimes.

time_part_sort

Groups "values" as a nested list according to the "sub_format_str" of the "timestamps".

timestamp2index

Calculates the array index for a certain time in an equidistant time-series given the reference time (where the index would be 0) and the time discretization.

index2timestamp

Calculates the ISOstring timestamp for a certain index in an equidistant time-series given the reference time (where the index would be 0) and the time discretization.