Skip to contents

Calendar

Usage

calendar(object)

# S4 method for class 'character'
calendar(object)

Arguments

object

A character string specifying the abbreviated label of the time scale (see details) or an object from which to extract the time scale.

Value

A TimeScale object.

Details

The following time scales are available:

labeleracalendar
BPBefore PresentGregorian
BCBefore ChristGregorian
BCEBefore Common EraGregorian
ADAnno DominiGregorian
CECommon EraGregorian
b2kYears before 2000Gregorian
julianJulian

Note

Inspired by era::era() by Joe Roe.

See also

Other calendar tools: calendar_get, convert(), gregorian, is(), julian()

Author

N. Frerebeau

Examples

## Define time scales
calendar("BP")
#> Before Present (BP): Gregorian years counted backwards from 1950.
calendar("AD")
#> Anno Domini (AD): Gregorian years counted forwards from 0.
calendar("julian")
#> Julian years counted forwards from 1.

## Shortcuts
BP()
#> Before Present (BP): Gregorian years counted backwards from 1950.
AD()
#> Anno Domini (AD): Gregorian years counted forwards from 0.
J()
#> Julian years counted forwards from 1.