fmdates (version 0.1.4)

Calendar: Build a calendar

Description

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().

Usage

Calendar(locale, tz)

EmptyCalendar()

AUSYCalendar()

AUMECalendar()

CHZHCalendar()

EUTACalendar()

GBLOCalendar()

HKHKCalendar()

JPTOCalendar()

NOOSCalendar()

NZAUCalendar()

NZWECalendar()

USNYCalendar()

Arguments

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 AUSY rather than AU/SYD per the LOCODE specification). The locale is used as a prefix to the calendar's S3 class in the following manner: <locale>Calendar (e.g. AUSYCalendar).

tz

the time zone associated with the given locale using OlsonNames() (e.g. Australia/Sydney)

Value

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.

See Also

Other calendar classes: JointCalendar

Examples

Run this code
# NOT RUN {
Calendar(NA, NA) # Defined: EmptyCalendar()
Calendar("AUSY", "Australia/Sydney") # Defined: AUSYCalendar()
# }

Run the code above in your browser using DataCamp Workspace