Skip to content

Commit

Permalink
minor edits to warning text, start datetime of 15-minute data
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylweiss committed Jul 3, 2024
1 parent 4dffff9 commit cd6537a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/az_15min.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ az_15min <- function(station_id = NULL, start_date_time = NULL, end_date_time =
# Query API ------------------------------------------------------------------

if (is.null(start_date_time) & is.null(end_date_time)) {
message("Querying most recent date-time of 15-minute data ...")
message("Querying most recent datetime of 15-minute data ...")
} else {
message(
"Querying data from ", format(params$start, "%Y-%m-%d %H:%M:%S")," through ", format(params$end, "%Y-%m-%d %H:%M:%S"), " ..."
Expand Down
2 changes: 1 addition & 1 deletion R/az_lw15min.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ az_lw15min <- function(station_id = NULL, start_date_time = NULL, end_date_time
# Query API ------------------------------------------------------------------

if (is.null(start_date_time) & is.null(end_date_time)) {
message("Querying most recent date-time of leaf wetness 15-minute data ...")
message("Querying most recent datetime of leaf wetness 15-minute data ...")
} else {
message(
"Querying data from ", format(params$start, "%Y-%m-%d %H:%M:%S")," through ", format(params$end, "%Y-%m-%d %H:%M:%S"), " ..."
Expand Down
4 changes: 2 additions & 2 deletions R/parse_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ parse_params <- function(station_id, start, end, hour = FALSE, real_time = FALSE
# For hourly, if only ymd is supplied to `end`, round up to end of day. On a
# given day, hourly data go from 1:00:00 to 23:59:59. For 15min, if only ymd
# is supplied to `end`, set to current Arizona time. On a given day, 15 min
# data go from 00:00:01 to 23:59:59
# data go from 00:00:00 to 23:59:59
if (isTRUE(hour) & is_ymd(end)) { # Hourly data
end_ <- paste(end, "23:59:59")
} else if (isTRUE(real_time) & is_ymd(end)) { # 15min data
Expand Down Expand Up @@ -112,7 +112,7 @@ parse_params <- function(station_id, start, end, hour = FALSE, real_time = FALSE
if (isTRUE(hour) & is_ymd(start)) { # Hourly data
start_ <- paste(start, "01:00:00")
} else if (isTRUE(real_time) & is_ymd(start)) { # 15min data
start_ <- paste(start, "00:00:01")
start_ <- paste(start, "00:00:00")
} else { # Daily weather and leaf wetness data
start_ <- start
}
Expand Down

0 comments on commit cd6537a

Please sign in to comment.