tidyverse / lubridate

Make working with dates in R just that little bit easier
https://lubridate.tidyverse.org
GNU General Public License v3.0
728 stars 207 forks source link

Need an `as.list()` method for Period and Duration objects #1080

Open DavisVaughan opened 1 year ago

DavisVaughan commented 1 year ago
x <- lubridate::hours(1:5)
as.list(x)
#> [[1]]
#> [1] 0
#> 
#> [[2]]
#> [1] 0
#> 
#> [[3]]
#> [1] 0
#> 
#> [[4]]
#> [1] 0
#> 
#> [[5]]
#> [1] 0

We do have an as.list() method for Interval, so we can probably borrow from that?