Description Usage Arguments Value Examples
Format the display of a date period.
1 | pretty_date_range(date1, date2, separator = " - ", show_wday = FALSE)
|
date1, date2 |
The dates to be formatted (either date objects or strings with the format "YYYY-MM-DD"). |
show_wday |
Whether or not to display the
day of the week. Default: |
A string with both dates provided formatted.
1 2 3 4 5 6 7 8 | prettyDateRange("9-20-2019", "09-21-2019", show_wday=FALSE)
# outputs "September 20th - 21st, 2019"
prettyDateRange("9-20-2019", "10-20-2019", show_wday=FALSE)
# outputs "September 20th - October 20th, 2019"
prettyDateRange("9-20-2019", "10-20-2020", show_wday=FALSE)
# outputs "September 20th, 2019 - October 20th, 2020"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.