From db8f0a2fa68b619471f480a3eb6f28054370f344 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Sun, 18 Apr 2021 13:47:24 +0430 Subject: [PATCH] LibCore: Remove the no-longer-used Core::DateTime::is_before() function --- Userland/Libraries/LibCore/DateTime.cpp | 6 ------ Userland/Libraries/LibCore/DateTime.h | 3 --- 2 files changed, 9 deletions(-) diff --git a/Userland/Libraries/LibCore/DateTime.cpp b/Userland/Libraries/LibCore/DateTime.cpp index 4e9a8ec345..064f3b460e 100644 --- a/Userland/Libraries/LibCore/DateTime.cpp +++ b/Userland/Libraries/LibCore/DateTime.cpp @@ -249,10 +249,4 @@ String DateTime::to_string(const String& format) const return builder.build(); } -bool DateTime::is_before(const String& other) const -{ - auto now_string = String::formatted("{:04}{:02}{:02}{:02}{:02}{:02}Z", year(), month(), weekday(), hour(), minute(), second()); - return __builtin_strcasecmp(now_string.characters(), other.characters()) < 0; -} - } diff --git a/Userland/Libraries/LibCore/DateTime.h b/Userland/Libraries/LibCore/DateTime.h index 59b08758ae..02d710781d 100644 --- a/Userland/Libraries/LibCore/DateTime.h +++ b/Userland/Libraries/LibCore/DateTime.h @@ -56,9 +56,6 @@ public: static DateTime now(); static DateTime from_timestamp(time_t); - // 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: