Skip to content

Commit

Permalink
Fix lubridate 'roll' warning #291 (#294)
Browse files Browse the repository at this point in the history
danielvartan authored Jan 23, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 04b36e7 commit ee53752
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/filter-index.R
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ start_window.POSIXct <- function(x, y = NULL, ...) {
abort_not_chr(y, class = "POSIXct")
assertTime(y)
y <- utctime(y, tz = "UTC")
force_tz(y, tz(x), roll = TRUE)
force_tz(y, tz(x), roll_dst = c("boundary", "post"))
}
}

@@ -215,7 +215,7 @@ end_window.POSIXct <- function(x, y = NULL, ...) {
lgl_yrmth <- nchar(y) < 9 & nchar(y) > 4
lgl_yr <- nchar(y) < 5
y <- utctime(y, tz = "UTC")
y <- force_tz(y, tz(x), roll = TRUE)
y <- force_tz(y, tz(x), roll_dst = c("boundary", "post"))
if (any(lgl_date)) {
y[lgl_date] <- y[lgl_date] + period(1, "day")
}

0 comments on commit ee53752

Please sign in to comment.