Nobody types a full clock time on a time card. They type 9 , hit tab, type 5 , and expect the calculator to know what they mean. The first version of my time card calculator did not know. It treated a bare 9 as 09:00 and a bare 5 as 05:00, so a normal nine-to-five shift came out as minus four hours. That was the bug report that taught me the most about how people actually type times.
The rule people already carry in their heads
When someone writes 9 for a clock-in and 5 for a clock-out, they are not being lazy. They are using a rule they have used on paper timesheets for years: the morning number is AM, the evening number is PM. Nobody clocks in at 9pm and clocks out at 5am on a normal day shift, so the meaning is obvious to a human. It just was not obvious to my parser.
So I gave the parser the same assumption. A bare number typed into a clock-in field defaults to AM. A bare number typed into a clock-out field defaults to PM.β¦