Skip to content

Commit

Permalink
fix bug in trunc_time that prevents truncation
Browse files Browse the repository at this point in the history
  • Loading branch information
prockenschaub committed Mar 15, 2024
1 parent 7f2cc42 commit 09239e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/utils-ts.R
Original file line number Diff line number Diff line change
Expand Up @@ -643,11 +643,11 @@ padded_capped_diff <- function(x, final, max) {
trunc_time <- function(x, min, max) {

if (not_null(min)) {
replace(x, x < min, min)
x <- replace(x, x < min, min)
}

if (not_null(max)) {
replace(x, x > max, max)
x <- replace(x, x > max, max)
}

x
Expand Down

0 comments on commit 09239e4

Please sign in to comment.