Skip to content

Commit

Permalink
setlocale fix in get_met_gdas1
Browse files Browse the repository at this point in the history
  • Loading branch information
MRPHarris committed Jul 16, 2021
1 parent dd6722b commit fbeee08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/get_met_gdas1.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ get_met_gdas1 <- function(days,
seq(min_date, max_date, by = "1 day") %>%
lubridate::day()

# "en_US.UTF-8" is not a valid locale for windows.
# "en_US.UTF-8" is not a valid locale for windows.
os_for_locale <- get_os()
if(os_for_locale == "win"){
month_names <-
seq(min_date, max_date, by = "1 day") %>%
lubridate::month(label = TRUE, abbr = TRUE, locale = Sys.getlocale("LC_TIME")) %>%
lubridate::month(label = TRUE, abbr = TRUE, locale = Sys.setlocale("LC_TIME", "English")) %>%
as.character() %>%
tolower()
} else {
Expand Down

0 comments on commit fbeee08

Please sign in to comment.