Skip to content

Commit

Permalink
Fjernet avhengighet av pakken timeplyr
Browse files Browse the repository at this point in the history
Finnes ikke på Cran for tiden
  • Loading branch information
arnfinn committed Jan 16, 2025
1 parent 2e27bf2 commit e96fb14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Imports:
shiny,
shinyalert,
sship (>= 0.9.0),
timeplyr,
utils,
yaml
RoxygenNote: 7.3.2
Expand Down
8 changes: 4 additions & 4 deletions R/autoReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,10 @@ runAutoReport <- function(dayNumber = as.POSIXlt(Sys.Date())$yday + 1,
target == "db"
&& as.Date(rep$startDate) <= dato
&& as.Date(rep$terminateDate) > dato
&& dato %in% timeplyr::time_seq(
&& dato %in% seq.Date(
as.Date(rep$startDate),
dato,
time_by = rep$interval
by = rep$interval
) # 'days', 'weeks', 'months', 'years',
)) {
# get explicit referenced function and call it
Expand Down Expand Up @@ -715,10 +715,10 @@ findNextRunDate <- function(runDayOfYear,
nextDate <- as.Date(startDate)
}
if (Sys.Date() >= startDate && Sys.Date() <= terminateDate) {
dateseq <- timeplyr::time_seq(
dateseq <- seq.Date(
as.Date(startDate),
as.Date(terminateDate),
time_by = interval
by = interval
)
tidsdiff <- difftime(dateseq, Sys.Date(), units = "days")
tidsdiff[tidsdiff <= 0] <- NA
Expand Down

0 comments on commit e96fb14

Please sign in to comment.