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.

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()
#> Calendars: 
#> Brazil/ANBIMA, Brazil/B3, Brazil/BMF, actual, weekends
has_calendars(c("actual", "weekends"))
#> [1] TRUE TRUE