Hi @francisbarton,
the question is well asked. And I think, you're right; it does not make sense. But I think it's the standard format which the lubridate makers chose for (what they call) periods. Maybe to make the difference to a duration.
You could use base R's difftime which is in days.
Example
library(lubridate)
as.difftime(ymd("2022-10-20") - today())
#> Time difference of 748 days
as.difftime(ymd_h("2022-10-20 0") - now())
#> Time difference of 747.1813 days
# the base unit is days for difftime
as.numeric(as.difftime(ymd_h("2022-10-20 0") - now()))
#> [1] 747.1813
# while the base unit for period is the second
as.numeric(as.period(ymd("2022-10-20") - today()))
#> [1] 64627200
Created on 2020-10-02 by the reprex package (v0.3.0)
The main difference to durations occurs when we try to display your example in months which usually have an unspecific length
as.period(
interval(ymd("1982-08-10"), today()),
unit = "months"
)
#> [1] "457m 22d 0H 0M 0S"
as.period(
interval(ymd("1982-08-10"), today()),
unit = "days"
)
#> [1] "13933d 0H 0M 0S"
We learn that an average month here has this many days:
(13933 - 22) / 457
#> [1] 30.43982
