This class provides helper utilities to display, sort, and select attributes from a date in the CSL format.

csl_date(
  date_parts = list(),
  season = NULL,
  circa = NULL,
  literal = NULL,
  raw = NULL,
  edtf = NULL
)

csl_dates(x = list())

Arguments

date_parts

A list containing one or two dates in a list. Each date is also represented using lists in the format of list(year, month, day). Different precision can be achieved by providing an incomplete list: list(year, month). A range of dates can be specified by providing two dates, where the first date is the start and second date is the end of the interval.

season, circa, literal, raw, edtf

Additional date variable properties as described in the schema.

x

A list of csl_date() values.

Examples

# Single date
csl_date(date_parts = list(list(2020,03,05)))
#> 2020-3-5
# Date interval
csl_date(date_parts = list(list(2020,03,05), list(2020,08,25)))
#> 2020-3-5/2020-8-25