1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 15:37:46 +00:00

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
parent ed28008d78
commit 39997e2ab1

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 };