diff --git a/src/time/Calendar.hxx b/src/time/Calendar.hxx index c8a0983f1..d9b9c9e40 100644 --- a/src/time/Calendar.hxx +++ b/src/time/Calendar.hxx @@ -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; +}