Skip to contents

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

Usage

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(as.Date("2021-10-13"), "%G/%OQ/%q")