summaryrefslogtreecommitdiff
path: root/Kernel/RTC.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2020-08-25 16:38:24 -0400
committerAndreas Kling <kling@serenityos.org>2020-08-26 08:52:07 +0200
commit84ed2579594fdadef29ba145d8a7948ffe26200b (patch)
tree4a79cc738e8392253977fa1237e3f88aecbfe257 /Kernel/RTC.cpp
parent394e4c04cd5dfdca56f67e6384288a209bdbf6dc (diff)
downloadserenity-84ed2579594fdadef29ba145d8a7948ffe26200b.zip
AK+LibC+LibCore+Kernel: Have fewer implementations of is_leap_year
Diffstat (limited to 'Kernel/RTC.cpp')
-rw-r--r--Kernel/RTC.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Kernel/RTC.cpp b/Kernel/RTC.cpp
index 46e2528939..d2944f7100 100644
--- a/Kernel/RTC.cpp
+++ b/Kernel/RTC.cpp
@@ -26,6 +26,7 @@
#include <AK/Assertions.h>
#include <AK/LogStream.h>
+#include <AK/Time.h>
#include <Kernel/CMOS.h>
#include <Kernel/RTC.h>
@@ -48,11 +49,6 @@ static bool update_in_progress()
return CMOS::read(0x0a) & 0x80;
}
-inline bool is_leap_year(unsigned year)
-{
- return ((year % 4 == 0) && ((year % 100 != 0) || (year % 400) == 0));
-}
-
static unsigned days_in_months_since_start_of_year(unsigned month, unsigned year)
{
ASSERT(month <= 11);