Updating components
year(datetime) <- 2030
datetime
## [1] "2030-03-08 19:32:28 UTC"
hour(datetime) <- hour(datetime) + 1
datetime
## [1] "2030-03-08 20:32:28 UTC"
update(datetime, years = 2024, months = 2)
## [1] "2024-02-08 20:32:28 UTC"
update(datetime, years = 2024, months = 2, mdays = 30)
## [1] "2024-03-01 20:32:28 UTC"