From df3e6174b6ed259c4ded4b3510a656250cc1ddb2 Mon Sep 17 00:00:00 2001 From: david072 Date: Fri, 17 Nov 2023 21:51:04 +0100 Subject: [PATCH] LibCore/DateTime: Add more binary operators --- Userland/Libraries/LibCore/DateTime.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibCore/DateTime.h b/Userland/Libraries/LibCore/DateTime.h index 63d053777b..8d52c968c4 100644 --- a/Userland/Libraries/LibCore/DateTime.h +++ b/Userland/Libraries/LibCore/DateTime.h @@ -42,6 +42,9 @@ public: static Optional 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: