polymerist.genutils.logutils.timestamps

Tools for formatting and recording timestamps for events

Attributes

TIMESTAMP_LOG

TIMESTAMP_FMT

TIMESTAMP_RE

Classes

Timestamp

For storing information on date processing

Module Contents

polymerist.genutils.logutils.timestamps.TIMESTAMP_LOG = '%Y-%m-%d %H:%M:%S'
polymerist.genutils.logutils.timestamps.TIMESTAMP_FMT = '%m-%d-%Y_at_%H-%M-%S_%p'
polymerist.genutils.logutils.timestamps.TIMESTAMP_RE
class polymerist.genutils.logutils.timestamps.Timestamp[source]

For storing information on date processing

fmt_str: str = '%m-%d-%Y_at_%H-%M-%S_%p'
regex: str | re.Pattern
timestamp_now() str[source]

Return a string timestamped with the current date and time (at the time of calling)

extract_datetime(timestr: str) datetime.datetime[source]

De-format a string containing a timestamp and extract just the timestamp as a datetime object