Add Holiday Hours - Split Post Reporting Date Method

IMPORTANT: This is an outdated method for scripting Holiday hours. It still works and is here for reference, but please see Holiday Worked and Holiday Hours Scripting for updated information on how this can be done now.

The first script goes in the SplitPostReportingDateScript Processing Rule:

if (islasttoday AND reportingdate.isholiday){
    split (dateadd("s","-1",outtime));

This script will split the last second of their last punch of the holiday. Once we have done that, the next script will change the hours of that 1 second punch to the Holiday hours.

This script is added to PayRateScript Processing Rule:

if (reportingdate.isholiday AND islasttoday AND hours <= .01){
    category = "Holiday";
    hours = 8;

This once again checks if it is a holiday and if it's the last punch of the day, but it also looks for an instance where the hours are less than or equal to .01 hours. That criteria will be met by the 1 second split punch we created in the previous script. Once it finds that punch set, it will change the category to Holiday and change the hours to 8.

Did you find this article helpful?