diff --git a/R/utils.R b/R/utils.R index d0b07535..178a72ec 100644 --- a/R/utils.R +++ b/R/utils.R @@ -118,7 +118,7 @@ date_today <- function() { date_as_rfc_2822 <- function(date) { date <- as.Date(date, tz = "UTC") with_locale( - new = c("LC_TIME" = "en_US.UTF-8"), + new = c("LC_TIME" = ifelse(is_windows(), "English", "en_US.UTF-8")), as.character(date, format = "%a, %d %b %Y %H:%M:%S %z", tz = "UTC") ) } @@ -252,6 +252,10 @@ is_osx <- function() { Sys.info()["sysname"] == "Darwin" } +is_windows <- function() { + .Platform$OS.type == "windows" +} + # function for resolving resources distill_resource <- function(name) { system.file("rmarkdown/templates/distill_article/resources", name,