An extension of format.Date with additional formatting strings for quarters. Used by linelist2sts.

formatDate(x, format)

Arguments

x

a "Date" object.

format

a character string, see strftime for possible specifications. Further to these base formats, formatDate implements:

"%Q"

the quarter as a numeric

"%OQ"

the quarter as a roman numeral

"%q"

the day within the quarter

Value

a character vector representing the input date(s) x following the format specification.

See also

Examples

formatDate(Sys.Date(), "%G/%OQ/%q")