LibCore/DateTime: Add more binary operators

This commit is contained in:
david072
2023-11-17 21:51:04 +01:00
committed by Andrew Kaster
parent b657fa6f95
commit df3e6174b6

View File

@@ -42,6 +42,9 @@ public:
static Optional<DateTime> parse(StringView format, StringView string);
bool operator<(DateTime const& other) const { return m_timestamp < other.m_timestamp; }
bool operator>(DateTime const& other) const { return m_timestamp > other.m_timestamp; }
bool operator<=(DateTime const& other) const { return m_timestamp <= other.m_timestamp; }
bool operator>=(DateTime const& other) const { return m_timestamp >= other.m_timestamp; }
bool operator==(DateTime const& other) const { return m_timestamp == other.m_timestamp; }
private: