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.
a date, object of class POSIXct. Defaults to lubridate::now()
Month format. `"long"` for full month name (the default), `"short"` for month abbreviation, or `"number"` for numeric.
`"long"` for 4-digit (default), `"short"` for 2-digit.
Locale string. Defaults to `"cs_CZ.UTF-8"`
Whether to put a dot after the day. Defaults to TRUE.
a string of same length as input
format_date_human()
#> Warning: OS reports request to set locale to "cs_CZ.UTF-8" cannot be honored
#> 22. August 2024
format_date_human(month_format = "short")
#> Warning: OS reports request to set locale to "cs_CZ.UTF-8" cannot be honored
#> 22. Aug 2024
format_date_human(month_format = "number")
#> Warning: OS reports request to set locale to "cs_CZ.UTF-8" cannot be honored
#> 22. 8. 2024
format_date_human(year_format = "long")
#> Warning: OS reports request to set locale to "cs_CZ.UTF-8" cannot be honored
#> 22. August 2024
format_date_human(month_format = "short", locale = "fr_FR")
#> Warning: OS reports request to set locale to "fr_FR" cannot be honored
#> 22. Aug 2024
format_date_human(month_format = "short", locale = "en_US", day_dot = FALSE)
#> Warning: OS reports request to set locale to "en_US" cannot be honored
#> 22 Aug 2024
format_date_human(date = c(lubridate::now(),
lubridate::now() - 100000),
month_format = "short", locale = "fr_FR", day_dot = FALSE)
#> Warning: OS reports request to set locale to "fr_FR" cannot be honored
#> 22 Aug 2024
#> 21 Aug 2024