Skip to content

Commit

Permalink
lints
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau committed Aug 21, 2024
1 parent 4aa743f commit 9bd5b9a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions R/staging_is_active.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#' @description Check if the stating universe is active.
#' @return `TRUE` if the staging universe is active, `FALSE` otherwise.
#' @param start Character vector of `"%m-%d"` dates that the
#' staging universe becomes active. Staging will then last for a full calendar
#' month. For example, if you supply a start date of `"01-15"`,
#' then the staging period will include all days from `"01-15"` through `"02-14"`
#' and not include `"02-15"`.
#' staging universe becomes active. Staging will then last for a full
#' calendar month. For example, if you supply a start date of `"01-15"`,
#' then the staging period will include all days from `"01-15"`
#' through `"02-14"` and not include `"02-15"`.
#' @param today Character string with today's date in `"%Y-%m-%d"` format or an
#' object convertible to POSIXlt format.
#' @examples
Expand All @@ -16,11 +16,11 @@ staging_is_active <- function(
start = c("01-15", "04-15", "07-15", "10-15"),
today = Sys.Date()
) {
today <- as.POSIXlt(today, tz = "UTC")
start <- strsplit(start, split = "-", fixed = TRUE)
start <- lapply(start, as.integer)
within <- lapply(start, within_staging, today = today)
any(as.logical(within))
today <- as.POSIXlt(today, tz = "UTC")
start <- strsplit(start, split = "-", fixed = TRUE)
start <- lapply(start, as.integer)
within <- lapply(start, within_staging, today = today)
any(as.logical(within))
}

within_staging <- function(start, today) {
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ json
repo
pkgdown
pre
POSIXlt

0 comments on commit 9bd5b9a

Please sign in to comment.