feat(learn): label Jan/Feb month anchors common-year vs leap (#8) - #29
Merged
Conversation
Stage 3 listed "January: the 3rd (the 4th in leap years)" — the lead value (3rd, 28th) was the silent non-leap anchor and the parenthetical the silent leap variant, the exact skim-trap the stage warns about. Label each explicitly. - curriculum.ts: "January: the 3rd in common years, the 4th in leap years"; "February: the last day — the 28th in common years, the 29th in leap years". Trim the framing line's redundant "shift by one" mechanic, keeping the "trap that catches everyone" warning + that only Jan/Feb change. Even-month doubles and the 9-to-5 odd mnemonic are leap-invariant — left untouched. - CheatSheet.tsx: add a caption "Jan/Feb shown for common years; each is +1 in a leap year" so the terse table cells are labeled too. - curriculum.test.ts: lock the common/leap labels + digits on Jan/Feb and assert no leap qualifier leaks onto the even-month doubles. Values match the engine (monthAnchor: common Jan 3/Feb 28, leap Jan 4/Feb 29). Gates: typecheck, lint, tests, build — all green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Cleanup from /simplify + /code-review on the Jan/Feb labels PR: - Drop the framing line's redundant second sentence — "Only Jan and Feb change in leap years" already implies every other anchor is unchanged. - Tighten the test's even-month-doubles filter to same-number-both-sides so it no longer also matches March's "3/14"; the `doubles` set (and its length>0 guard) now means what its name says. typecheck ✓ · lint --max-warnings 0 ✓ · tests ✓ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes #8. Roadmap item 4/7.
Stage 3 "Month anchors" listed
January: the 3rd (the 4th in leap years)— the lead value (3rd, 28th) was the silent non-leap anchor and the parenthetical the silent leap variant. A learner skimming the list reads "the 3rd" as always-true and misses the override — the exact "trap that catches everyone" the stage warns about.Change
Label each Jan/Feb item explicitly (per-item, so even a list-skimmer can't miss it):
January: the 3rd in common years, the 4th in leap yearsFebruary: the last day — the 28th in common years, the 29th in leap yearsThe framing line drops its now-redundant "shift by one" mechanic but keeps the warning and adds that only Jan/Feb change: "Only Jan and Feb change in leap years — the trap that catches everyone. Every other anchor is the same all years."
Even-month doubles (
4/4…) and the9-to-5 / 7-Elevenodd mnemonic are leap-invariant (verified) — left untouched.CheatSheet.tsxgains a caption so its terse cells are labeled too.Verification
Values match the engine (
monthAnchor: common Jan 3 / Feb 28, leap Jan 4 / Feb 29). New test locks the common/leap labels + digits and asserts no leap qualifier leaks onto the even-month doubles. typecheck ✓ · lint ✓ · tests ✓ · build ✓.🤖 Generated with Claude Code