Convert Dates to Character (Including Quarter Strings)
An extension of format.Date
with additional formatting strings for quarters. Used by linelist2sts
.
formatDate(x, format)
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 quartera character vector representing the input date(s) x
following the format
specification.
strftime
formatDate(as.Date("2021-10-13"), "%G/%OQ/%q")