Description Usage Arguments Value Examples
This function is useful for formatting dates in reports - especially in the
header of an Rmarkdown report. Default behavior uses today's date. See
strptime
for details on month and year code strings.
1 | pretty_date(x = Sys.Date(), month_code = "%B", year_code = "%Y")
|
x |
a date object to convert to a string |
month_code |
the code used to format the month - defaults to full month name |
year_code |
the code used to format the year - defaults to full 4 digit year |
a length 1 character vector
1 2 3 4 5 | # returns nice format for today's date
pretty_date()
pretty_date(as.Date('2020-03-01'))
# March 1st, 2020
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.