Skip to content

docs(date): use useTimeZone for current date guidance - #739

Merged
IzumiSy merged 2 commits into
mainfrom
fix/export-today
Nov 18, 2026
Merged

IzumiSy merged 2 commits into
mainfrom
fix/export-today

Conversation

@IzumiSy

@IzumiSy IzumiSy commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

The DatePicker documentation and migration examples suggest a standalone today helper that is not part of the public AppShell exports. AppShell already provides useTimeZone() with today() and now() 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 with timeZone.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

  • Update the DatePicker import and constraint example to use useTimeZone(), with a browser-timezone-independent weekend predicate.
  • Align the DatePicker migration examples and current-date/time hook guidance with the same API.
  • Regenerate documentation, consumer skill references, and manifest hashes from the authored sources.
  • Include a patch changeset describing the documentation correction; add no standalone today export or regression test.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Code Metrics Report

main (8ab89c9) #739 (4e38a4f) +/-
Coverage 62.9% 62.9% 0.0%
Test Execution Time 3m8s 4m24s +1m16s
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
IzumiSy changed the base branch from docs/migrate-static-examples to main November 18, 2026 04:24
@IzumiSy
IzumiSy marked this pull request as ready for review November 18, 2026 04:24
@IzumiSy
IzumiSy requested a review from a team as a code owner November 18, 2026 04:24
@IzumiSy IzumiSy changed the title fix(date): export today from package root docs(date): use useTimeZone for current date guidance Nov 18, 2026
@IzumiSy
IzumiSy merged commit 1b8514a into main Nov 18, 2026
6 checks passed
@IzumiSy
IzumiSy deleted the fix/export-today branch November 18, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants