diff options
author | Nico Weber <thakis@chromium.org> | 2020-08-25 16:38:24 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-26 08:52:07 +0200 |
commit | 84ed2579594fdadef29ba145d8a7948ffe26200b (patch) | |
tree | 4a79cc738e8392253977fa1237e3f88aecbfe257 /Kernel/RTC.cpp | |
parent | 394e4c04cd5dfdca56f67e6384288a209bdbf6dc (diff) | |
download | serenity-84ed2579594fdadef29ba145d8a7948ffe26200b.zip |
AK+LibC+LibCore+Kernel: Have fewer implementations of is_leap_year
Diffstat (limited to 'Kernel/RTC.cpp')
-rw-r--r-- | Kernel/RTC.cpp | 6 |
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); |