Source code for utility.time

"""
time.py
====================================
Utility time functions.
"""

import pandas as pd

[docs]def assert_datetime(entry: str) -> bool: """ This method checks whether an entry can be converted to a valid datatime :param entry: entry to check :return: boolean value whether conversion successful """ return pd.to_datetime(entry, format='%d-%m-%Y', errors='coerce') is not pd.NaT