calendar-register: Calendars register

calendar-registerR Documentation

Calendars register

Description

Every calendar created with create.calendar is stored in the calendar register. The idea behind this register is allowing calendars to be accessed by its names.

Usage

calendars()

remove_calendars(cals)

has_calendars(cals)

Arguments

cals

character vector of calendars names

Details

calendars returns the object which represents the calendars register. Since the register inherits from environment, the calendars are retrieved with the [[ operator. But the register object has its own print generic which helps listing all registered calendars.

remove_calendars remove calendars from the register.

Examples

# ACTUAL calendar
cal <- create.calendar("Actual")
cal <- calendars()[["Actual"]]
remove_calendars("Actual")
# lists registered calendars
calendars()
has_calendars(c("actual", "weekends"))

bizdays documentation built on May 29, 2024, 11:56 a.m.