Calendars are necessary for two reasons: they define whether a calendar day
is a good business day in a given locale and they are used to store the time
zone for the locale. Calendars can correspond to a single locale (usually a
city). These inherit from the Calendar
class. The package implements a
number of calendars for key financial market locales such as
AUSYCalendar
, USNYCalendar
and EUTACalendar
(TARGET). You can
also define a joint locale using JointCalendar()
.
Calendar(locale, tz) EmptyCalendar() AUSYCalendar() AUMECalendar() CHZHCalendar() EUTACalendar() GBLOCalendar() HKHKCalendar() JPTOCalendar() NOOSCalendar() NZAUCalendar() NZWECalendar() USNYCalendar()
locale | a four letter string representing an abbreviation of the
locale. The package uses locale representations loosely based on
UN/LOCODE (e.g.
Australia/Sydney is represented by |
---|---|
tz | the time zone associated with the given |
Calendar()
returns a function that constructs an object inheriting
from the Calendar
class. The calendar constructors provided by the
package returns an object that inherits from Calendar
.
Other calendar classes: JointCalendar
Calendar(NA, NA) # Defined: EmptyCalendar()#> function () #> { #> structure(list(locale = locale, tz = tz), class = c(paste0(locale, #> "Calendar"), "Calendar")) #> } #> <bytecode: 0x7f906a523c60> #> <environment: 0x7f906a5235d0>Calendar("AUSY", "Australia/Sydney") # Defined: AUSYCalendar()#> function () #> { #> structure(list(locale = locale, tz = tz), class = c(paste0(locale, #> "Calendar"), "Calendar")) #> } #> <bytecode: 0x7f906a523c60> #> <environment: 0x7f906e2d8100>