1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibCore: Make DateTime's members signed

Core::DateTime is essentially a C++ wrapper of the tm struct, so we
should support the same signed range as the underlying tm.
This commit is contained in:
Idan Horowitz 2021-08-19 19:16:03 +03:00 committed by Linus Groh
parent 332b29c741
commit 95bc8e4641
3 changed files with 17 additions and 17 deletions

View file

@ -48,7 +48,7 @@ inline bool is_leap_year(int year)
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
}
inline unsigned days_in_year(int year)
inline int days_in_year(int year)
{
return 365 + is_leap_year(year);
}