Sample Calendar Rules
The Calendar Utility provides a sample Calendar, SAMPLE_US, that contains the following Calendar rules for standard business adjustments, based on Saturday and Sunday defined as weekend days.
NEXTWORKDAY
When a date falls on a weekend day or a holiday, adjust the date to the next workday.
- Description
- ‘Next Workday'
- Avoid
- WEEKEND,HOLIDAY
- Adjustment
- Next Day
For example, when an aged date falls on a Saturday or Sunday, the date is adjusted to the following Monday, but if Monday is a holiday, the date is adjusted to Tuesday (provided Tuesday is not a holiday and so on).
PREVWORKDAY
When a date falls on a weekend day or a holiday, adjust the date to the previous workday.
- Description
- ‘Previous Workday'
- Avoid
- WEEKEND,HOLIDAY
- Adjustment
- Previous Day
For example, when an aged date falls on a Saturday or Sunday, the date is adjusted to the previous Friday, but if Friday is a holiday, the date is adjusted to Thursday (provided Thursday is not a holiday and so on).
CLOSWORKDAY
When a date falls on a weekend or holiday, adjust the date to the closest workday.
- Description
- ‘Closest Workday'
- Avoid
- WEEKEND,HOLIDAY
- Adjustment
- Closest Day
For example, when an aged date falls on a Saturday, the date is adjusted to the previous Friday. If the date falls on a Sunday, the date is adjusted to the following Monday. If the date falls on a holiday, the date is adjusted to the closest weekday.
NEXTWEEKDAY
When a date falls on a weekend day, adjust the date to the next weekday.
- Description
- ‘Next Weekday'
- Avoid
- WEEKEND
- Adjustment
- Next Day
For example, when an aged date falls on a Saturday or Sunday, the date is adjusted to the following Monday.
PREVWEEKDAY
When a date falls on a weekend day, adjust the date to the previous weekday.
- Description
- ‘Previous Weekday'
- Avoid
- WEEKEND
- Adjustment
- Previous Day
For example, when an aged date falls on a Saturday or Sunday, the date is adjusted to the previous Friday.
CLOSWEEKDAY
When a date falls on a weekend day, adjust the date to the closest weekday.
- Description
- ‘Closest Weekday'
- Avoid
- WEEKEND
- Adjustment
- Closest Day
For example, when an aged date falls on a Saturday, the date is adjusted to the previous Friday. If the date falls on Sunday, the date is adjusted to Monday.
NEXTSTRTQTR
When a date does not fall on a date defined as the start-of-quarter day, adjust the date to the next quarter.
- Description
- ‘Next Workday after Quarter'
- Avoid
- WEEKEND, HOLIDAY
- Search
- QUARTER
- Adjustment
- Next Day
For example, when a calculated date is March 5th, the date is adjusted to April 1st (the start of the next quarter). If April 1st is a weekend or holiday, the date is adjusted again to the next following weekday.
PREVSTRTQTR
When a date does not fall on a date defined as the start-of-quarter day, adjust the date to the previous quarter.
- Description
- ‘Previous Workday before Quarter'
- Avoid
- WEEKEND, HOLIDAY
- Search
- QUARTER
- Adjustment
- Previous Day
For example, when a calculated date is March 5th, the date is adjusted to January 1st (the start of the previous quarter). If January 1st is a weekend or holiday, the date is adjusted again to the next following weekday.
CLOSSTRTQTR
When a date does not fall on a date defined as the start-of-quarter day, adjust the date to the closest quarter.
- Description
- ‘Closest Workday after Quarter'
- Avoid
- WEEKEND, HOLIDAY
- Search
- QUARTER
- Adjustment
- Closest Day
For example, when a calculated date is March 5th, the date is adjusted to April 1st. If the date is January 15th, the date is adjusted to January 1st. If the first day of the quarter is not a workday, the date is adjusted again to the closest weekday.
NEXTPAYDAY
When a date does not fall on a date defined as a payday, adjust the date to the next payday.
- Description
- ‘Next Payday'
- Search
- PAYDAY
- Adjustment
- Next Day
For example, when a calculated date is March 5th and payday is defined as the 1st and the 15th day of each month, the date is adjusted to March 15th.
PREVPAYDAY
When a date does not fall on a date defined as a payday, adjust the date to the previous payday.
- Description
- ‘Previous Payday'
- Search
- PAYDAY
- Adjustment
- Previous Day
For example, when the date is March 5th and payday is defined as the 1st and the 15th day of each month, the date is adjusted to March 1st.
CLOSPAYDAY
When a date does not fall on a date defined as a payday, adjust the date to the closest payday.
- Description
- ‘Closest Payday'
- Search
- PAYDAY
- Adjustment
- Closest Day
For example, when a calculated date is March 5th and payday is defined as the 1st and the 15th day of each month, the date is adjusted to March 1st, the closest payday.