More about Calendar data instances
|
|
The second key part of a calendar instance identifies a start date for its use. The system computes the end date of a calendar as one year after the last holiday defined on the Schedule tab.
References to calendars identify a name, but not a start date. When supplied with a date and a calendar name, the system finds the Calendar data instance with that name and the latest Start Date key part not greater than the supplied date.
For example, a system contains four calendars, each indicating that December 31 is a business holiday, with these keys:
If the system needs to access a calendar named ThorrUS with a supplied date of 20050715, it uses the third calendar listed, even though the second calendar also covers July 15, 2005.
If this system needs a ThorrUS, calendar value beyond December 31, 2007, a Java exception is thrown, and a log message is added similar to the following:
The calendar obj corresponding to BusinessDay[3570] is null.
Review the Pega-RULES:BusinessCalendar library for useful functions that use calendar data instances.
Changes you make to calendar data instances take effect only after the system restarts. Changes made to the calendar referenced in an Operator ID data instance take effect the next time that operator logs in.
See PDN article How BusinessCalendar functions AddDays() and AddTime() treat holidays, weekends, and time zones.
business day, calendar |