polymerist.genutils.logutils.timestamps ======================================= .. py:module:: polymerist.genutils.logutils.timestamps .. autoapi-nested-parse:: Tools for formatting and recording timestamps for events Attributes ---------- .. autoapisummary:: polymerist.genutils.logutils.timestamps.TIMESTAMP_LOG polymerist.genutils.logutils.timestamps.TIMESTAMP_FMT polymerist.genutils.logutils.timestamps.TIMESTAMP_RE Classes ------- .. autoapisummary:: polymerist.genutils.logutils.timestamps.Timestamp Module Contents --------------- .. py:data:: TIMESTAMP_LOG :value: '%Y-%m-%d %H:%M:%S' .. py:data:: TIMESTAMP_FMT :value: '%m-%d-%Y_at_%H-%M-%S_%p' .. py:data:: TIMESTAMP_RE .. py:class:: Timestamp For storing information on date processing .. py:attribute:: fmt_str :type: str :value: '%m-%d-%Y_at_%H-%M-%S_%p' .. py:attribute:: regex :type: Union[str, re.Pattern] .. py:method:: timestamp_now() -> str Return a string timestamped with the current date and time (at the time of calling) .. py:method:: extract_datetime(timestr: str) -> datetime.datetime De-format a string containing a timestamp and extract just the timestamp as a datetime object