diff --git a/org_rw/org_rw.py b/org_rw/org_rw.py index b2b5832..413c7c7 100644 --- a/org_rw/org_rw.py +++ b/org_rw/org_rw.py @@ -568,6 +568,16 @@ class Timestamp: and (self.repetition == other.repetition) ) + def __lt__(self, other): + if not isinstance(other, Timestamp): + return False + return self.to_datetime() < other.to_datetime() + + def __gt__(self, other): + if not isinstance(other, Timestamp): + return False + return self.to_datetime() > other.to_datetime() + def __repr__(self): return timestamp_to_string(self)