Durations

jon_age <- today() - ymd("1975-01-24")
jon_age
## Time difference of 18074 days
as.duration(jon_age)
## [1] "1561593600s (~49.48 years)"
ddays(0:3) + dhours(2)
## [1] "7200s (~2 hours)"     "93600s (~1.08 days)"  "180000s (~2.08 days)"
## [4] "266400s (~3.08 days)"
ymd_hms("2024-03-10 01:00:00", tz = "America/Chicago") + ddays(1)
## [1] "2024-03-11 02:00:00 CDT"
dyears(1) / ddays(1)
## [1] 365.25