Skip to contents

Get or Set the Default Calendar

Usage

get_calendar(...)

set_calendar(object)

# S4 method for class 'ANY'
get_calendar(...)

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

# S4 method for class 'missing'
set_calendar()

Arguments

...

Currently not used.

object

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

Value

A TimeScale object.

See also

Other calendar tools: calendar(), calendar_get, convert(), gregorian, is_calendar(), 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