summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-04-18 13:47:24 +0430
committerAndreas Kling <kling@serenityos.org>2021-04-18 14:18:16 +0200
commitdb8f0a2fa68b619471f480a3eb6f28054370f344 (patch)
treee05611a3725c89942180e82f65e5583351d49770 /Userland/Libraries/LibCore
parent38f4441103a999eef503a12bbe6cdf925207edec (diff)
downloadserenity-db8f0a2fa68b619471f480a3eb6f28054370f344.zip
LibCore: Remove the no-longer-used Core::DateTime::is_before() function
Diffstat (limited to 'Userland/Libraries/LibCore')
-rw-r--r--Userland/Libraries/LibCore/DateTime.cpp6
-rw-r--r--Userland/Libraries/LibCore/DateTime.h3
2 files changed, 0 insertions, 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: