Skip to content

feat(dives): a dive whose time of day is unknown shows and edits as a date - #287

Merged
aleskiontherun merged 1 commit into
mainfrom
claude/web-2-before-the-tag
Sep 25, 2026
Merged

aleskiontherun merged 1 commit into
mainfrom
claude/web-2-before-the-tag

Conversation

@aleskiontherun

Copy link
Copy Markdown
Member

The API now serves a bare YYYY-MM-DD start_time for an imported dive whose time of day was never recorded, and keeps that state for as long as PATCH /dive/{uuid} receives the bare date back. isDateOnlyStartTime names the shape; formatDiveDateTime drops the clock for it and formatDiveStartTime stops after the date, so the list, the page header, the neighbour and merge labels, the renumber preview and the gas-use chart show a date instead of a midnight nobody recorded. splitStartTime returns the date without a time, so the edit form echoes it unchanged, and DiveStartTimeField shows the date, an empty time box and a disabled offset select; typing a time sends an offsetless date-time, which ends the state. A file that states only a day, applied to such a dive, keeps it a date. The create form is unchanged.

Verified with npm run lint, type-check, test (the date tests also under TZ UTC, America/Los_Angeles and Pacific/Kiritimati) and build.

🤖 Generated with Claude Code

… date

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the feat New user-visible behaviour label Sep 25, 2026
@aleskiontherun
aleskiontherun merged commit 4c9bd78 into main Sep 25, 2026
12 checks passed
@aleskiontherun
aleskiontherun deleted the claude/web-2-before-the-tag branch September 25, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New user-visible behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant