Most Recent Update - Bug fixes, functionality suggestions, some code refactoring and potentially some user impacting changes related to replacing cookie storage with HTML5 localstorage.
See the change log box below for additional details.
If you notice any problems, please let me know.
If you want to use a previous revision look in the "previous versions" section below for links.
(Most recent backup: Prior to 2015-09-20)
This timecard tool seeks to provide a quick way to convert from work hours into a decimal for calculating your pay check.
I wrote it to keep track of my own work hours and I still use it.
Use at your own risk.
For example, if it calculates something incorrectly due to a bug, you are ultimately responsible to sanity check the results (but if you find bugs, please let me know--lets squash those!)
Thanks for the feedback and suggestions. Going forward, I'll try to make edits as time permits.
Instructions: (scenario based, to illustrate some time-saving features)
Press ALT-11 to jump to the first input on row 1.
Enter "8" and press TAB2 until the cursor appears in the ending hour (3 times)
Enter "5" and press TAB
Enter the hours and minutes for a lunch break which are not covered time.
Repeat these steps for row 2, 3, and so on.
As you move through the fields the totals for the row will auto-calculate.
As you move through the rows, the aggregated totals will update and display as Total Hrs.
The underlined characters imply a short-cut key which can make data-entry faster by reducing movement between the mouse and keyboard to navigate the form fields.
These are accessed by pressing ALT plus the underlined key.
If you use Firefox you need to press SHIFT-ALT-1, they just needed to be different I guess.
When you see the same key underlined more than once, the short-cut should move sequentially through the fields sharing that key.
TAB moves the cursor to the "next" input field. SHIFT-TAB moves the cursor to the "previous" input field.
CTRL-A selects/highlights all text in the current input field.
Force parse to treat numbers as base 10 to avoid accidental conversion to octal (base 8)
Fix a reported rounding issue where hours above 12 weren't rolling over to 1 and triggering AM/PM boundary cross-over.
Refactor "remember as template" to replace the cookie with localStorage. (Unfortunately, if you were using the cookie storage,
you might need to rebuild and re-save...I'm sorry about that. There are some advantages with local storage that I'm going to need--this meant biting the bullet and
replacing the cookie mechanism though. Again, sorry about that if you end up needing to repopulate your stored data.)
Add a label to the printing form per feedback.
Optional date column (fill if needed or leave empty if not). Note: I was hoping to use a date input type, but isn't consistent across browsers--hoping to revisit as support improves.
Optional rate field and estimate based on rate. (Again, please don't rely on this--you need to double-check any math done here for accuracy.)
A bit of code refactoring to hopefully help with maintenance going forward--and with any luck, no new bugs added :-(.
Adding a beta test printing feature.
Added "Print" button which renders a print-only flavored version of the timecard and calls the system print operation.
Switching doctype to begin pursuing using HTML5 for this application
Add "overtime" column: Present any hours/minutes greater than 8 in a day in the overtime column to make it easy to differentiate from the total.
Add "normal" hours column: Hours up to 8 in any day...this is the counterpart to overtime column.
Remember as template: When button is clicked, a cookie will be set containing the current state of the form.
The idea is that when you return, if it finds the cookie it will ask if you want to set the initial values you remembered as the starting point
for entering time details.
More lines. (Went from 5 lines... the standard work week I was using when I wrote this, to 14 days based on various input... basically two full weeks based on a seven day week.)