Testing overnight shifts and historical hourly rates in Sigub
A useful wage record should still make sense when someone opens it months later. The December 3, 2026 source changes to Sigub, my hourly-pay and work-record app, cover shifts across midnight, configured breaks, dated hourly rates and saved pay amounts. The examples below come from the project’s published test cases. They are test fixtures, not actual workers’ pay records.
A shift can cross midnight
Someone working from 23:00 to 02:00 has a three-hour shift. Simply subtracting two clock readings would give the wrong answer. Sigub’s getShiftDurationMinutes test expects 180 minutes for 23:00 → 02:00 and 780 minutes for 20:00 → 09:00.
The calculation also needs minute-level precision. In payroll.test.js, one minute between 09:00 and 09:01 at a fixture rate of 10,320 won per hour produces 172 won when breaks are disabled. The rate is a test input; it does not describe a reader’s contract.
Rest time comes from the recorded policy
Sigub’s default-policy test assigns 30 minutes of rest to a four-hour shift and 60 minutes to an eight-hour shift. For a 13-hour interval from 20:00 to 09:00, the configured 60-minute break leaves 12 calculated working hours. The break-time tests also distinguish paid and unpaid breaks, preserve custom schedules and handle an older saved default policy.
These calculations depend on the times and policies recorded in the app. The records alone cannot establish which breaks actually occurred or whether a particular legal allowance must be paid.
Keep the rate that applied on the work date
The rate-history tests use this sample timeline:
| Work-record date | Hourly rate in the test |
|---|---|
| 2026-06-30 | 10,320 won |
| 2026-07-01 | 11,000 won |
The earlier rate includes its last effective day; the new rate applies from the next day. A separate case checks that overlapping rate records do not silently select an arbitrary value.
A historical record also needs protection from unrelated edits. One payroll.test.js case keeps a saved amount of 12,345 won when only the record’s notes change. Recalculating that old shift using today’s settings would alter the meaning of the original record.
What was released
The examples come from the December 3 payroll source change and related tests in the original Sigub repository. The corresponding GitHub Pages deployment succeeded that day, and the public entry page at sigub.kr is reachable. These source-level cases check specific inputs; they do not independently verify anyone’s actual wages or statutory entitlement.
The Sigub project case study provides the wider product context. The original Korean product introduction documents its earlier interface and workflow.