From cd6537a59e9cc7ec417ae31f51ad7dbebf4db59e Mon Sep 17 00:00:00 2001 From: Jeremy Weiss Date: Wed, 3 Jul 2024 16:12:09 -0700 Subject: [PATCH] minor edits to warning text, start datetime of 15-minute data --- R/az_15min.R | 2 +- R/az_lw15min.R | 2 +- R/parse_params.R | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/az_15min.R b/R/az_15min.R index 2e977f0..3e07909 100755 --- a/R/az_15min.R +++ b/R/az_15min.R @@ -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"), " ..." diff --git a/R/az_lw15min.R b/R/az_lw15min.R index a95ab1a..50f4d45 100644 --- a/R/az_lw15min.R +++ b/R/az_lw15min.R @@ -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"), " ..." diff --git a/R/parse_params.R b/R/parse_params.R index c57843e..ed5a2d2 100644 --- a/R/parse_params.R +++ b/R/parse_params.R @@ -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 @@ -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 }