1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +00:00

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: