Holiday Recalculate Rule

Class Name

com.workbrain.app.ta.quickrules.HolidayRecalculateRule

Overview

There are unique cases where the auto-recalc feature (see Defining automatic recalculation) cannot catch all records in the past that require recalculation. One of the most common cases is the Public Holiday Pay Rule, when the holiday falls on the last work day in a pay period and the public holiday payment depends on a worked day in the next x number of days.

Parameters

Parameter Description
Days To Look Back For Holiday Definition A safeguard to make sure the rule only runs when there is a holiday definition within specified days. Suggested days is the maximum number of off days plus 1.
Must Work Days After The same value that is supplied in the holiday rule.

Example

This example shows the importance of the Holiday Recalculate Rule.

Assumptions:

  • Must Work Scheduled Days Before = 1
  • Must Work Scheduled Days After = 1
  • 03/26/2004 is a holiday
  • Give 8 hours of HOL/REG premium if condition is satisfied

Initial Details:

Day Time Code Hour Type Hours
03/22/2004 (Monday) WRK REG 8
03/23/2004 WRK REG 8
03/24/2004 WRK REG 8
03/25/2004 WRK REG 9
03/26/2004 (Holiday) UAT UNP 8
03/27/2004
03/28/2004
03/29/2004 UAT UNP 8

When the employee clocks in for work on Monday 03/29/2004 (the first scheduled day after the holiday), Friday 03/26/2004 is now eligible for the HOL premium (see the expected results chart to follow). A recalculate period of ENTIRE WEEK would not be sufficient for this case since a change on 03/29/2004 would only attempt to recalculate the week from 03/29/2004 to 04/04/2004.

Therefore, for this example, the Holiday Recalculate Rule should be implemented with these parameters:

  • Days To Look Back For Holiday Definition = 7
  • Must Work Days After = 1

Since the employee has a holiday on 03/26/2004 and 03/29/2004 is the first work day after the holiday, the rule would recalculate 03/26/2004 to ensure the correct premiums. Here are the expected results:

Day Time Code Hour Type Hours
03/22/2004 (Monday) WRK REG 8
03/23/2004 WRK REG 8
03/24/2004 WRK REG 8
03/25/2004 WRK REG 9
03/26/2004 (Holiday) HOL REG 8
03/27/2004
03/28/2004
03/29/2004 WRK UNP 8