Intervals

y2023 <- ymd("2023-01-01") %--% ymd("2024-01-01")
y2024 <- ymd("2024-01-01") %--% ymd("2025-01-01")
y2023 / dyears(1)
## [1] 0.9993155
y2023 / days(1)
## [1] 365
y2024 / dyears(1)
## [1] 1.002053
y2024 / days(1)
## [1] 366