pretty_date: Format a Date for Display.

Description Usage Arguments Value Examples

View source: R/prettyDates.R

Description

Format a Date for Display.

Usage

1
2
pretty_date(date, show_year = TRUE, show_month = TRUE,
  show_wday = FALSE)

Arguments

date

The date to be formatted (either a date object or a string with the format "YYYY-MM-DD").

show_year

Whether or not to display year in output. Default: TRUE.

show_month

Whether or not to display month in output. Default: TRUE.

show_wday

Whether or not to display the day of the week in output. Default: FALSE.

Value

A string that represents the date supplied in date.

Examples

1
2
3
4
5
prettyDate("9-20-2019")
# September 20th, 2019

prettyDate("9-20-2019", show_wday=T)
# Friday, September 20th, 2019

niedermansam/marketR documentation built on Nov. 4, 2019, 10:06 p.m.