feat: now "7 days" will be created for std::chrono::weeks instead of a quantity in seconds

This commit is contained in:
Mateusz Pusz
2023-08-15 11:22:23 +02:00
parent 1d822d0ea4
commit af26c48795

View File

@ -52,6 +52,8 @@ template<typename Period>
return hour;
else if constexpr (is_same_v<Period, std::chrono::days::period>)
return day;
else if constexpr (is_same_v<Period, std::chrono::weeks::period>)
return mag<7> * day;
else
return mag<ratio{Period::num, Period::den}> * second;
}