Repository navigation
docs(date): use useTimeZone for current date guidance - #739
Merged
Merged
Conversation
Contributor
Code Metrics Report
Details | | main (8ab89c9) | #739 (4e38a4f) | +/- |
|---------------------|----------------|----------------|--------|
| Coverage | 62.9% | 62.9% | 0.0% |
| Files | 294 | 294 | 0 |
| Lines | 13483 | 13483 | 0 |
| Covered | 8485 | 8485 | 0 |
- | Test Execution Time | 3m8s | 4m24s | +1m16s |Reported by octocov |
IzumiSy
force-pushed
the
fix/export-today
branch
from
November 18, 2026 04:24
6dffca7 to
209d85b
Compare
IzumiSy
marked this pull request as ready for review
November 18, 2026 04:24
interacsean
approved these changes
Nov 18, 2026
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.
Motivation
The DatePicker documentation and migration examples suggest a standalone
todayhelper that is not part of the public AppShell exports. AppShell already providesuseTimeZone()withtoday()andnow()methods bound to its configured timezone. Correct the guidance to use that existing API rather than adding another public export or calculating the minimum date in the browser's timezone regardless of application configuration.Design Decision
Reuse the existing timezone-bound API
Call
useTimeZone()inside the component and obtain the minimum date withtimeZone.today(). Keep the public API, runtime implementation, dependencies, and test fixtures unchanged. Document that the current-date/time methods evaluate the clock when called but do not schedule re-renders.Summary
useTimeZone(), with a browser-timezone-independent weekend predicate.todayexport or regression test.