vspinu / timechange

Efficient Updating of Date-Times
GNU General Public License v3.0
30 stars 3 forks source link

Handle inifinities? #8

Closed hadley closed 4 years ago

hadley commented 4 years ago
library(lubridate, warn.conflicts = FALSE)
inf <- .Date(Inf)
unclass(inf)
#> [1] Inf
unclass(timechange::time_add(inf, hours = 12))
#> [1] NA
#> attr(,"tzone")
#> [1] "UTC"

Created on 2019-11-20 by the reprex package (v0.3.0)

Would be needed for https://github.com/tidyverse/lubridate/issues/732