---
app_version: 0.5.0
precision: 2
live: true
form_title: When can I leave today?
form_description: Enter when you started and how long your breaks are — see how much you have worked so far, when you can leave and how much is still to go. Updates every minute.
form_inputs: #Settings|collapsed, Started at|start, Breaks|pause{min}, Daily target|target{h}, Flexitime before today|balance{h}
form_outputs: Worked so far|worked, Leave at|leave, Still to go|remaining, Flexitime after today|balance_after
---
# When can I leave today?
// This sheet runs live: lines with `now` update every minute. The clock
// icon next to them switches that on and off. This notebook also has a FORM
// (Pro): Form → Form view for an input mask.

# Your day
start = 8:12          // when you clocked in
pause = 45 min        // breaks taken or planned
target = 8 h          // contracted hours per day

# Right now
worked = now - start - pause
leave = start + target + pause
remaining = leave - now
"Worked so far": worked
"Leave at": leave
"Still to go": remaining

# Flexitime
// Your balance before today, from your time sheet.
balance = 2.5 h       // 2 h 30 min
balance_after = balance + worked - target
"Flexitime after today": balance_after
// Negative "still to go" means you are already past your target.
