Skip to content

fix(list): include non-work gaps in TGT calculation and align ΔWORK#44

Merged
umpire274 merged 1 commit intomainfrom
v0.8.7
Apr 27, 2026
Merged

fix(list): include non-work gaps in TGT calculation and align ΔWORK#44
umpire274 merged 1 commit intomainfrom
v0.8.7

Conversation

@umpire274
Copy link
Copy Markdown
Owner

Fix incorrect TGT (target end time) calculation in presence of non-work gaps. Previously, TGT was computed as first_in + expected_work_time, ignoring personal absences (non-work gaps), causing inconsistencies with ΔWORK.

Updated logic:

  • TGT now includes non-work gaps: TGT = first_in + expected_work_time + non_work_gaps
  • ΔWORK is now consistently calculated as: ΔWORK = OUT - TGT
  • Removed implicit subtraction of non-work gaps to avoid double counting

Applied changes to:

  • standard list output
  • compact list output

Also updated documentation:

  • CHANGELOG.md with fix details and example
  • README.md to clarify TGT behavior

No changes to core work time calculation or database schema.

Closes #43

Fix incorrect TGT (target end time) calculation in presence of non-work gaps.
Previously, TGT was computed as `first_in + expected_work_time`, ignoring
personal absences (non-work gaps), causing inconsistencies with ΔWORK.

Updated logic:
- TGT now includes non-work gaps:
  TGT = first_in + expected_work_time + non_work_gaps
- ΔWORK is now consistently calculated as:
  ΔWORK = OUT - TGT
- Removed implicit subtraction of non-work gaps to avoid double counting

Applied changes to:
- standard list output
- compact list output

Also updated documentation:
- CHANGELOG.md with fix details and example
- README.md to clarify TGT behavior

No changes to core work time calculation or database schema.

Closes #43
@umpire274 umpire274 merged commit a4e40a5 into main Apr 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TGT does not account for non-work gaps (personal absences)

1 participant