Returns the number of days in each of a vector of years or months.
Value
A numeric vector of the numbers of days in each of the years in
year or the months specified by year and month.
Details
The length of the output vector is equal to the length of month.
The argument year is recycled to the length of the output vector if
necessary.
Examples
days_in_year(1999:2025)
#> [1] 365 366 365 365 365 366 365 365 365 366 365 365 365 366 365 365 365 366 365
#> [20] 365 365 366 365 365 365 366 365
days_in_month(2024, 1:12)
#> [1] 31 29 31 30 31 30 31 31 30 31 30 31
days_in_month(2025, 1:12)
#> [1] 31 28 31 30 31 30 31 31 30 31 30 31
days_in_month(2024:2025, 1:3)
#> [1] 31 29 31 31 28 31