In the first example today() returns January 1, 1970...
library(lubridate)
#>
#> Attaching package: 'lubridate'
#> The following objects are masked from 'package:base':
#>
#> date, intersect, setdiff, union
c(today()-dyears(1), today())
#> [1] "2020-03-11 18:00:00 UTC" "1970-01-01 05:11:38 UTC"
c(as.Date(today()-dyears(1)), today())
#> [1] "2020-03-11" "2021-03-12"
In the first example
today()returns January 1, 1970...