Comparison methods for datetime.date or datetime.datetime objects.
It extends the BaseComparator() and includes methods to check equality, less than, less than or equal to, greater than, and greater than or equal to between two datetime objects. It also includes error handling for type mismatches.
Example
>>> import datetime
>>> tc = DatetimeComparator()
>>> tc.equal(datetime.date(2024, 3, 12), datetime.date(2024, 3, 12))
> True
>>> tc.get('equal')(datetime.date(2024, 3, 12), datetime.date(2024, 3, 12))
> True