format_date_human | R Documentation |
Returns a string represenation of a date, with month names in the chosen locale and leading zeros removed. Month and date formats are customisable without having to remember format codes. Defaults are geared towards Czech-locale dates.
format_date_human(
date = lubridate::now(),
month_format = c("long", "short", "number"),
year_format = c("long", "short"),
locale = "cs_CZ.UTF-8",
day_dot = TRUE
)
date |
a date, object of class POSIXct. Defaults to lubridate::now() |
month_format |
Month format. '"long"' for full month name (the default), '"short"' for month abbreviation, or '"number"' for numeric. |
year_format |
'"long"' for 4-digit (default), '"short"' for 2-digit. |
locale |
Locale string. Defaults to '"cs_CZ.UTF-8"' |
day_dot |
Whether to put a dot after the day. Defaults to TRUE. |
a string of same length as input
format_date_human()
format_date_human(month_format = "short")
format_date_human(month_format = "number")
format_date_human(year_format = "long")
format_date_human(month_format = "short", locale = "fr_FR")
format_date_human(month_format = "short", locale = "en_US", day_dot = FALSE)
format_date_human(date = c(lubridate::now(),
lubridate::now() - 100000),
month_format = "short", locale = "fr_FR", day_dot = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.