Commit graph

3 commits

Author SHA1 Message Date
Nico Weber 1ab8939077 AK+LibC+LibCore: Have fewer implementations of day_of_week
The implementation in LibC did a timestamp->day-of-week conversion
which looks like a valuable thing to have. But we only need it in
time_to_tm, where we already computed year/month/day -- so let's
consolidate on the day_of_week function in DateTime (which is
getting extracted to AK).
2020-08-26 08:52:07 +02:00
Nico Weber a7a18b478e AK+LibC+LibCore: Have fewer implementations of days_in_month 2020-08-26 08:52:07 +02:00
Nico Weber c85e679e2d AK+LibCore+Kernel: Have fewer implementations of day_of_year
The JS tests pointed out that the implementation in DateTime
had an off-by-one in the month when doing the leap year check,
so this change fixes that bug.
2020-08-26 08:52:07 +02:00