View source: R/prettify_date.R
prettify_date | R Documentation |
Render ordinal dates in UK or US style
prettify_date( date_to_format = Sys.Date(), uk_or_us = "UK", formal_or_informal = "informal" )
date_to_format |
The date to use. It must be either be of class |
uk_or_us |
Defaults to "UK", which results in outputs like "12th September 2022"; if "US", the output resembles "September 12th, 2022". |
formal_or_informal |
Defaults to "informal", so the ordinals are included (e.g. "st", "nd", "rd", "th"). If "formal" is chosen, the ordinals are omitted (e.g. "12 September 2022"). |
A string (e.g. "12th September 2022")
prettify_date(Sys.Date(), "UK", "informal")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.