Work Detail Rounding Rule

Class Name

com.workbrain.app.ta.quickrules.WkrdRounding

Overview

The application can track time to the minute, which for some employers is more accurate than needed. Often, time is represented in decimal format, so avoid any degree of accuracy beyond 1/10th of an hour or 6 minutes. To this end, they may elect to round time to every six minutes.

Parameters

You can use these parameters to configure the Work Detail Rounding Rule.

Parameter Description
Multiple For Start Use the round multiple for the first record in the Work_Details on a given day. The default value is 6 minutes.

If Multiple For Start equals Split For Start, then always round up to the next multiple.

Split For Start The split for the first record. All time worked up to, including the split, rounds down, while the remainder rounds up. The default value is 3 minutes.

If Split For Start equals to 0, then always round down to the previous multiple.

Time Code For Start Rounding The time code to be used to round the records at the start of the shift. The default value is RND. If two codes are defined in a comma-delimited list, the first code is used when the work detail is rounded down, and the second code is used when the work detail is rounded up. If no codes are supplied, the work detail record is reset to the rounded time.

For example, with a Multiple For Start value of 15, a Split For Start value of 7, and a Time Code For Start Rounding value of RNDD, RNDU, these results would occur:

07:06 - 17:00 WRK becomes:

  • 07:00 - 07:06 RNDD
  • 07:06 - 17:00 WRK

07:08 - 17:00 WRK becomes:

  • 07:08 - 07:15 RNDU
  • 07:15 - 17:00 WRK
Multiple For Middle The round multiple to be used for all records other than the first or last in-shift records in the Work_Details on a given day. The default value is 6 minutes.
Split For Middle The split for the in-shift records. All time worked up to, including the split, rounds down, while the remainder rounds up. The default value is 3 minutes.
Time Code For Middle Rounding The time code to be used to round the records in the middle of the shift. The default value is RND.
Multiple For End The round multiple to be used for the last record in the Work_Details on a given day. The default value is 6 minutes.
Split For End The split for the last record. All time worked up to, including the split, rounds down, while the remainder rounds up. The default value is 3 minutes.
Time Code For End Rounding The time code to be used to round the records at the end of the shift. The default value is RND. If two codes are defined in a comma-delimited list, the first code is used when the work detail is rounded down, and the second code is used when the work detail is rounded up. If no codes are supplied, the work detail record is reset to the rounded time.

For example, with a Multiple For End value of 15, a Split For End value of 7, and a Time Code For End Rounding value of RNDD, RNDU, these results would occur:

07:00 - 16:50 WRK becomes:

  • 07:00 - 16:45 WRK
  • 16:45 - 16:50 RNDD

07:00 - 16:55 WRK becomes:

  • 07:00 - 16:55 WRK
  • 16:55 - 17:00 RNDU
Eligible Time Codes Select one or more time codes eligible for rounding from the list.

If you do not specify a value, the default value is WRK for the Eligible Time Codes field.

Eligible Time Codes controls which work details are included in rounding. When Eligible Time Codes for Start and End is not configured, Eligible Time Codes also determines the first and last eligible work detail records.

If Eligible Time Codes for Start and End is configured, the first or last record detection uses the new parameter instead. However, Eligible Time Codes controls the middle-record rounding. For example, you can use UAT to included for mid-day rounding and use WRK to for the first or last record used for schedule-start and schedule-end rounding.

Eligible Time Codes for Start and End Specifies the time codes that are used to identify the first and last eligible work detail records on the day for schedule-boundary rounding. The first eligible record's start time is rounded using the schedule start time as the anchor point. The last eligible record's end time is rounded using the schedule end time as the anchor point. If this parameter is not specified, the Eligible Time Code parameter determines the first and last eligible records. The Eligible Time Codes for Start and End parameter must be a subset of the Eligible Time Codes parameter.
Here is an example of a single clock pair with early departure.
  • Schedule: 8:15 AM to 4:00 PM
  • Employee clocks: ON 8:22 AM, OFF 3:45 PM
The configurations of the rule parameters for this example are:
  • Multiple for Start, Middle, and End is 6 minutes.
  • Split for Start, Middle, and End is 3 minutes.

Because Eligible Time Codes for Start and End is set to WRK, the system identifies Record 1 (WRK) as both the first and last eligible record for schedule-boundary rounding. This table shows the work details after clocks are applied:

Record Time Code Original Start Rounded Start Original End Rounded End
1 WRK 8:22 AM 8:21 AM 3:45 PM 3:42 PM
2 UAT 3:45 PM 4:00 PM
The Start and End time rounding calculations are:
  • Start rounding (anchor 8:15 AM, multiple 6, split 3)

    8:22 AM is 7 minutes after 8:15 AM. The 6-minute rounding intervals from 8:15 AM are 8:15, 8:21, 8:27, and 8:33 AM. The time 8:22 falls between 8:21 and 8:27 AM. The split point is 3 minutes after 8:21 AM, which is 8:24 AM. Because 8:22 AM is before 8:24 AM, the time rounds down to 8:21 AM.

  • End rounding (anchor 4:00 PM, multiple 6, split 3)

    3:45 PM is 15 minutes before 4:00 PM. The 6-minute rounding intervals backward from 4:00 PM are 4:00, 3:54, 3:48, 3:42, and 3:36 PM. The time 3:45 PM falls between 3:42 and 3:48 PM. The split point is 3 minutes after 3:42 PM, which is 3:45 PM. Since 3:45 PM is exactly at the split point, the behavior depends on whether the split boundary rounds up or down. If the convention is that exactly-at-split rounds down, then 3:45 PM rounds down to 3:42 PM.

The Start and End rounding results are:

  • Start rounding: 8:22 AM is rounded using the schedule start anchor of 8:15 AM.

  • End rounding: 3:45 PM is rounded using the schedule end anchor of 4:00 PM.

Eligible Hour Types The list of hour type that are eligible for being rounded. The default value is null for all hour types.
Based On Schedule When selected, instructs the application to round normalized to the scheduled start time and not midnight. This option is important when the shifts do not start at the even hour and the rounding multiple does not naturally fall on the scheduled start time. This option causes the start and middle rounding to be done based on schedule start time and the end rounding to be done based on schedule end time.
Apply To All Shifts During a Day Determines whether rounding applies to all shifts for the work date. The default is false and the check box is deselected.
Duration Based Determines whether rounding applies based on duration. Time-based rounding rounds both start and end times of work details. Duration-based rounding rounds the end times of work details based on start times so that duration fit the given multiple and splits.
Note: Often, using clock rounding is better because the records stay clean. Work detail record rounding is provided to satisfy further requirements. We recommend to use clock rounding wherever possible.