Default the date picker to local time and match the pipeline's non-leap day-of-year#10
Merged
Merged
Conversation
…ap day-of-year The date input defaulted to the UTC date via toISOString(), so after ~4-5pm Pacific the picker started on tomorrow -- exactly the evening hours the product's primary use case (night-before/trailhead planning) depends on. Separately, dayOfYear() counted real calendar days (366 in leap years) while pipeline/normalize.py encodes season windows with a fixed non-leap month table, so leap-year dates after Feb 28 compared one day high and a window ending 12/31 read closed on Dec 31 of a leap year (next occurrence: 2028). Rewrite dayOfYear() to use the same non-leap MONTH_START table as the pipeline, default the date input from local Y-M-D fields instead of toISOString(), and update legal.test.ts to lock in the corrected convention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Executes plans/004-local-date-and-doy-alignment.md. Advisor-reviewed: diff read, tests audited and re-run (28 vitest + 25 pytest).
🤖 Generated with Claude Code
https://claude.ai/code/session_01HNxgKNjtfeKtxYvN34KbGs