1---
2app_version: 0.1.0
3precision: 2
4form_title: Work Hours Tracker
5form_description: Track your actual work hours. Enter your daily start/end times, breaks and vacation days to see your weekly, monthly and yearly work hours, including overtime.
6form_inputs: Daily start|start, Daily end|end, Break duration|break_min{min}, Work days per week|work_days, Vacation days|vacation
7form_outputs: Daily hours|daily_hours, Weekly hours|weekly_hours, Monthly hours|monthly_hours, Yearly hours|yearly_hours, Overtime per year|overtime_yearly
8---
9# Work Hours Tracker
10// How many hours do you really work? Track your time and calculate overtime.
11
12# Work schedule
13// Clock times are written as they are: end - start is the time in between.
14start = 8:30 // work start time
15end = 17:00 // work end time
16break_min = 30 min // daily break duration
17work_days = 5 // days worked per week
18vacation = 25 // paid vacation days per year
19
20# Calculations
21// Daily work hours (excluding break), shown as hours and minutes.
22raw_daily = end - start
23daily_hours = raw_daily - break_min
24
25// Weekly hours
26weekly_hours = daily_hours * work_days
27
28// Standard full-time work hours (Germany: 40h/week)
29standard_weekly = 40 h
30
31// Overtime per week
32overtime_weekly = weekly_hours - standard_weekly
33
34// Monthly hours (average)
35work_weeks_per_year = 52 - vacation / work_days // vacation weeks removed
36monthly_hours = weekly_hours * 4.33 // average weeks per month
37
38// Yearly hours
39yearly_hours = weekly_hours * work_weeks_per_year
40
41// Standard yearly hours — the same 52 weeks minus your vacation, so the
42// comparison is like for like.
43standard_yearly = standard_weekly * work_weeks_per_year
44
45// Total overtime per year
46overtime_yearly = yearly_hours - standard_yearly
47
48# Results
49"Daily work hours (excl. break)": daily_hours
50"Break duration": break_min
51
52"Weekly hours": weekly_hours
53"Overtime per week": overtime_weekly
54"Monthly hours (~)": monthly_hours
55"Yearly hours (~)": yearly_hours
56
57"Standard (40h/week, same vacation)": standard_yearly
58"Overtime per year": overtime_yearly
59
60// What if you worked one hour more every day?
61extra_weekly = 1 h * work_days
62extra_yearly = extra_weekly * work_weeks_per_year
63"With +1h daily: yearly hours": yearly_hours + extra_yearly
64"With +1h daily: yearly overtime": overtime_yearly + extra_yearly
65
66// Effective hourly rate calculation (if you know your salary)
67// Uncomment and adjust to use:
68// salary_yearly = 60000 €
69// hourly_rate = salary_yearly / yearly_hours
70// "Effective hourly rate": hourly_rate
71