Skip to contents

[Deprecated]

Use stringi::stri_datetime_format() instead:

stringi::stri_datetime_format(format = c("datetime_short", "datetime_medium", "datetime_long", "datetime_full"),
                              locale = "en")

Usage

prettify_datetime(datetime, locale = c("en", "de", "en-US", "de-CH"))

Arguments

datetime

Datetime to be prettified. A datetime or something coercible to.

locale

Locale the datetime should be prettified for. Currently only "en"/"en-US" and "de"/"de-CH" are implemented.

Value

A character scalar.

Details

Note that prettify_datetime() might only work on (Ubuntu) Linux in the current form since locales are one bitchy hell of a PITA...

Examples

salim:::prettify_datetime("2021-12-21T00:00:01Z")
#> Warning: `prettify_datetime()` was deprecated in salim 0.0.9015.
#>  Use the more powerful and more robust `stringi::stri_datetime_format(format = c("datetime_short", "datetime_medium", "datetime_long", "datetime_full"),
#>   locale = "en")` function instead.
#> [1] "December 21, 2021, 12:00 AM"