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:
parent
332b29c741
commit
95bc8e4641
3 changed files with 17 additions and 17 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue