Salary Earned Counter
Now:
Counted working time since start:
Define a weekly working pattern (Mon–Sat, then Sun). Counter accrues only inside those windows. Updates every second.
Weekly working pattern
Copy a day’s pattern to other days
Copies enabled + start + end. (Lunch breaks assumed paid, so not modelled.)
Notes: if end is earlier than start, it’s treated as an overnight shift (e.g. 22:00–06:00).
How the pay rate is calculated
- Weekly hours = sum of each enabled day’s (end − start) hours (overnight supported).
- Hourly rate = annual salary ÷ (weekly hours × 52).
- Counter = (seconds that fall within work windows since start) × (hourly rate ÷ 3600).