"""Functions for date operations.""" import re import const def is_expected_datetime_format(value): """Check date format that is supported by CloudSearch. Args: value (str): UTC date Returns: str: (bool) """ try: return True if re.match(const.VALID_DATE_FORMAT, value) else False except Exception: return False