Closing-period worklog guide

Build a 21st-to-20th worklog and check its boundaries

Fix the period as [start,end): include the start instant, exclude the end instant, and keep unknown dates separate instead of guessing.

Fix the period first

This synthetic example uses Asia/Tokyo and the half-open interval from 2026-08-21 00:00 through 2026-09-21 00:00. The start is included; the end is excluded.

RecordDecisionSecondsReason
AExcluded60Ends just before the start
BIncluded120Starts exactly at the start
CIncluded180Ends before the close
DExcluded240Starts exactly at the end
UUNKNOWN45Start date is missing; do not guess

Sum included seconds

Only B and C are included: 120 seconds + 180 seconds = 300 seconds. A and D are boundary exclusions; U belongs to neither bucket.

[2026-08-21 00:00,
2026-09-21 00:00)
B + C = 300 seconds
Include start, exclude end.
UNKNOWN: U
Do not fill the date
Do not zero-fill
Pass uncertainty separately.

Keep handoff fields

Keep the period, timezone, boundaries, included IDs and seconds, excluded IDs, and unknown-date IDs in the same worklog handoff.

period: 2026-08-21..2026-09-21 [start,end)<br>timezone: Asia/Tokyo<br>included: B,C / 300 seconds<br>excluded: A,D<br>unknown: U (do not infer)

The files are synthetic fixtures. They do not fetch or send Stopwatch history or user input.

Scope of this guide

This guide checks worklog boundary conditions. It does not guarantee a legal deadline, invoice, contract, accounting treatment, or correctness of a live record.