csl_date: A date conforming to the CSL schema

Description Usage Arguments See Also Examples

View source: R/csl_date.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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.

See Also

https://citeproc-js.readthedocs.io/en/latest/csl-json/markup.html#date-fields

Examples

1
2
3
4
# Single date
csl_date(date_parts = list(list(2020,03,05)))
# Date interval
csl_date(date_parts = list(list(2020,03,05), list(2020,08,25)))

vitae documentation built on Feb. 17, 2021, 9:06 a.m.