Skip to content

Commit

Permalink
add array as possible class
Browse files Browse the repository at this point in the history
  • Loading branch information
miturbide committed May 31, 2021
1 parent 21f0fc4 commit a4ebb53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/fillGridDates.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ fillGridDates <- function(grid, tz = "") {
"DD" = "day",
"MM" = "month",
"YY" = "year")
xs <- seq.POSIXt(from = as.POSIXct(start[1]), to = as.POSIXct(start[length(start)]), by = by)
xe <- seq.POSIXt(from = as.POSIXct(end[1]), to = as.POSIXct(end[length(end)]), by = by)
xs <- seq.POSIXt(from = start[1], to = start[length(start)], by = by)
xe <- seq.POSIXt(from = end[1], to = end[length(end)], by = by)
end <- NULL
test <- data.frame("date" = start, "wh" = TRUE)
start <- NULL
Expand Down Expand Up @@ -126,7 +126,7 @@ setGridDates.asPOSIXlt <- function(grid, tz = "") {
grid$Dates$start <- as.POSIXlt.POSIXct(ds, tz = tz, format = format)
grid$Dates$end <- as.POSIXlt.POSIXct(de, tz = tz, format = format)

} else if (dateclass == "character") {
} else if (dateclass == "character" | dateclass == "array") {
if (tz == "") {# Try to guess
message("[", Sys.time(), "] Trying to determine the time zone...")
# If dates are defined as a character string, somehow we need to "guess" the format
Expand Down

0 comments on commit a4ebb53

Please sign in to comment.