Fixed lintr & complexity issues

This commit is contained in:
2026-02-03 14:50:49 +00:00
parent 2f97e9538b
commit 099b4def83

View File

@@ -13,16 +13,20 @@ formatRangeDates <- function(start, end, min, max) {
dates <- parseDateTime(orig_dates)
if (length(dates$min) != 0
start_before_min <- (
length(dates$min) != 0
&& length(dates$start) != 0
&& lubridate::ymd(dates$start) < lubridate::ymd(dates$min)
) {
)
if (start_before_min) {
dates$start <- dates$min
}
if (length(dates$max) != 0
end_after_max <- (
length(dates$max) != 0
&& length(dates$end) != 0
&& lubridate::ymd(dates$end) > lubridate::ymd(dates$max)
) {
)
if (end_after_max) {
dates$end <- dates$max
}