Fix civil-date public types: Day.date, currentPeriod, activeDate → YYYY-MM-DD strings
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api
Research direction
Start by reading the public types for Day and CalendarStore, then search for all-day event boundaries and existing tests that use Temporal.PlainDate. Update the affected exported types and usages so civil dates are YYYY-MM-DD strings while event start/end remain Date objects. Done means no exported type exposes Temporal.PlainDate, the named values and tests use identical ISO date strings, and consumers get a TypeScript error for the old property access.
Written by the indexing model from the issue text.
Description
Parent
https://github.com/TanStack/time/issues/25
What to build
Change every civil-date value at the public boundary from `Temporal.PlainDate` to a `YYYY-MM-DD` ISO string. This is a targeted breaking change that must land before the module API is built, so the correct types are foundational from the start.
Civil values affected: `Day.date`, `CalendarStore.currentPeriod`, `CalendarStore.activeDate`, and any all-day event boundary that is currently typed as `Temporal.PlainDate`.
Why: encoding a civil date as a `Temporal.PlainDate` leaks the Temporal polyfill into consumer types. Encoding it as a `Date` object introduces the all-day off-by-one bug (UTC-midnight reads incorrectly in west-of-UTC timezones). A `YYYY-MM-DD` string is the honest, zero-ambiguity representation of a calendar-civil day.
Instant-bearing values (event `start`/`end`) are unaffected — those remain `Date` objects.
Acceptance criteria
- `Day.date` is typed as `string` and carries a `YYYY-MM-DD` value
- `CalendarStore.currentPeriod` and `activeDate` are typed as `string` (`YYYY-MM-DD`)
- No `Temporal.PlainDate` appears in any exported type
- `Day.isoDate` (already present) is confirmed as the canonical fast-path key; `Day.date` and `Day.isoDate` carry identical values — one of them may be removed if redundant
- All existing tests updated to reflect the new types
- A consumer who previously accessed `Day.date.year` / `.month` / `.day` receives a TypeScript error pointing them to the ISO string instead
Blocked by
- Dominant language
- TypeScript
- Stars
- 621
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from TanStack/time
-
Dependency DashboardOpen
Difficulty 5/5 Over a week Newbie friendliness 5/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 32/100
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
oxc-project/tsrs#1010 ·
Maintainers usually reply within 1 day
-
area:infra area:storage bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
THU-MAIC/OpenMAIC#2311 · 1 comment ·
Maintainers usually reply within 1 day
-
docs documentation need-triage SaaS
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
enhancement from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nightly-labs/openbot#10973 ·
Maintainers usually reply within 1 day
-
status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-gemini/gemini-cli#30328 · 1 comment ·
Maintainers usually reply within 1 day