Learn R Programming

numform (version 0.7.0)

f_date: Format Dates

Description

Format dates to the typical '

Usage

f_date(x = Sys.Date(), format = "%B %d, %Y", ...)

ff_date(...)

Arguments

x

A vector of coercible dates.

format

A character string specifying the date output format.

Other arguments passed to as.Date.

Value

Returns a string of publication ready dates.

Examples

Run this code
# NOT RUN {
f_date(Sys.Date())
f_date(Sys.time())
f_date(Sys.time(), '%b-%y')
set.seed(10)
dates <- as.Date(sample(1:10000, 12), origin = '1970-01-01')
paste(f_date(range(dates)), collapse = ' to ')
# }

Run the code above in your browser using DataLab