Skip to content

Commit

Permalink
Merge pull request nationalparkservice#112 from nationalparkservice/s…
Browse files Browse the repository at this point in the history
…arah-dev

Update convert_datetime_format documentation and pkgdown site
  • Loading branch information
RobLBaker authored Jun 27, 2024
2 parents 838d490 + 73fac45 commit e6a882f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 33 deletions.
4 changes: 2 additions & 2 deletions R/dates_and_times.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ fix_utc_offset <- function(datetime_strings) {

#' Convert EML date/time format string to one that R can parse
#'
#' @details `convert_datetime_format()` is not a sophisticated function. If the EML format string is not valid, it will happily and without complaint return an R format string that will break your code. You have been warned. Note that UTC offset formats using a colon or only two digits will be parsed by this function, but if parsing datetime values from strings, you will also need to use `fix_utc_offset` to change the UTC offsets to the +/-hhhh format that R can read.
#' @details `convert_datetime_format()` is not a sophisticated function. If the EML format string is not valid, it will happily and without complaint return an R format string that will break your code. You have been warned. Note that UTC offset formats using a colon or only two digits will be parsed by this function, but if parsing datetime values from strings, you will also need to use `fix_utc_offset` to change the UTC offsets to the +/-hhmm format that R can read.
#'
#' @param eml_format_string A character vector of EML date/time format strings. This function understands the following codes: YYYY = four digit year, YY = two digit year, MMM = three letter month abbrev., MM = two digit month, DD = two digit day, hh or HH = 24 hour time, mm = minutes, ss or SS = seconds, +/-hhhh or +/-HHHH = UTC offset.
#' @param eml_format_string A character vector of EML date/time format strings. This function understands the following codes: YYYY = four digit year, YY = two digit year, MMM = three letter month abbrev., MM = two digit month, DD = two digit day, hh or HH = 24 hour time, mm = minutes, ss or SS = seconds, +/-hhmm, +/-hh:mm, or +/-hh = UTC offset.
#' @param convert_z Should a "Z" at the end of the format string (indicating UTC) be replaced by a "%z"? Only set to `TRUE` if you plan to use `fix_utc_offset` to change "Z" in datetime strings to "+0000".
#'
#' @return A character vector of date/time format strings that can be parsed by `readr` or `strptime`.
Expand Down
12 changes: 6 additions & 6 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ articles:
DRR_Purpose_and_Scope: DRR_Purpose_and_Scope.html
Starting-a-DRR: Starting-a-DRR.html
Using-the-DRR-Template: Using-the-DRR-Template.html
last_built: 2024-06-27T14:37Z

last_built: 2024-06-27T19:41Z


18 changes: 9 additions & 9 deletions docs/reference/convert_datetime_format.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions docs/reference/replace_blanks.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/convert_datetime_format.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e6a882f

Please sign in to comment.