time/Calendar: add DaysInYear()

This commit is contained in:
Max Kellermann 2021-12-08 19:44:28 +01:00
parent 50a617764a
commit 31c7151580

View File

@ -51,3 +51,9 @@ DaysInMonth(unsigned month, unsigned year) noexcept
else
return DaysInFebruary(year);
}
constexpr unsigned
DaysInYear(unsigned year) noexcept
{
return IsLeapYear(year) ? 366 : 365;
}