-
Notifications
You must be signed in to change notification settings - Fork 214
Open
Description
cannot figure out how to extract the number of days in duration ¯\_(ツ)_/¯
lubridate::duration("31d 21H 25M 30S")
[1] "2755530s (~4.56 weeks)"
but
lubridate::duration("31d 21H 25M 30S") %>% lubridate::days()
[1] "2755530d 0H 0M 0S"
lubridate::duration("31d 21H 25M 30S") %>% lubridate::day()
[1] 1
lubridate::duration("31d 21H 25M 30S") %>% lubridate::duration(units="days")
[1] "238077792000s (~7544.23 years)"
additional question : shouldn't the hour/minute/second components of a duration be extracted by hourS/minuteS/secondS?
because
lubridate::duration("31d 21H 25M 30S") %>% lubridate::hour()
[1] 21
lubridate::duration("31d 21H 25M 30S") %>% lubridate::hours()
[1] "2755530H 0M 0S"
Metadata
Metadata
Assignees
Labels
No labels