formatDate: Convert Dates to Character (Including Quarter Strings)

View source: R/isoWeekYear.R

formatDateR Documentation

Convert Dates to Character (Including Quarter Strings)

Description

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

strftime

Examples

formatDate(as.Date("2021-10-13"), "%G/%OQ/%q")

surveillance documentation built on Nov. 2, 2023, 6:05 p.m.