LibCore: Implement operator less-than for Core::DateTime

that just compares their timestamps.
This commit is contained in:
AnotherTest 2021-04-18 13:43:38 +04:30 committed by Andreas Kling
commit 39997e2ab1
Notes: sideshowbarker 2024-07-18 19:27:55 +09:00

View file

@ -59,6 +59,7 @@ public:
// FIXME: This should be replaced with a proper comparison
// operator when we get the equivalent of strptime
bool is_before(const String&) const;
bool operator<(const DateTime& other) const { return m_timestamp < other.m_timestamp; }
private:
time_t m_timestamp { 0 };