Skip to content

feat(i18n)!: a -u-ca- keyword selects the calendar - #10000

Draft
nynexman4464 wants to merge 2 commits into
mainfrom
nynexman4464/feat/calendar-locale-keyword
Draft

nynexman4464 wants to merge 2 commits into
mainfrom
nynexman4464/feat/calendar-locale-keyword

Conversation

@nynexman4464

@nynexman4464 nynexman4464 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Base is main. The calendar stack it builds on (#9643 → #9842) is merged.

Held for the 0.8.0 minor; do not merge in a patch release. pnpm check:changesets rejects this pull request's [breaking] Changeset while main declares a patch version (0.7.9). It passes once main declares 0.8.0.

User need

An application that passes a locale such as th-TH-u-ca-buddhist or fa-IR-u-ca-persian to InternationalizationProvider names its calendar in the BCP 47 tag it already owns. On the stack below, Astryx ignores that keyword and shows Gregorian dates, so the application must repeat the same choice in calendar. Two inputs that disagree are a source of bugs: the locale says Buddhist, and the date fields say Gregorian. Honoring the keyword lets the tag alone select the calendar, as Intl.DateTimeFormat does. Because it changes what an existing locale shows with no code change, it is breaking (spec:AST-017 FR1) and ships in a minor release.

Problem and solution fit

  • Primary: InternationalizationProvider resolves its calendar as its calendar prop, then an explicit -u-ca- keyword in locale, then gregory. A component's own calendar prop still comes first (useCalendarSystem). This restores the keyword lookup that the stack removed.
  • Primary: the keyword islamic resolves to islamic-tbla, as ECMA-402 resolves it. The alias applies only to the keyword; calendar="islamic" stays an unknown identifier that resolves to gregory and warns.
  • Supporting: tests, the provider docs and JSDoc (which keep main's statement that Timestamp, PowerSearch, and Lab's Schedule write their dates in the calendar), the five records' compatibility lines, and the PersianFromLocaleKeyword story.
  • Supporting: a [breaking] Changeset with the migration.

Current specification

  • component:InternationalizationProvider FR10 and ORD3 (changed here).
  • architecture:internationalization INV10 (changed here).
  • spec:AST-111 FR2 and DEC-2 decide calendar resolution. AST-111 (merged in spec(AST-111): date components use the calendar the application chooses #9605) still says a -u-ca- keyword does not select the calendar. The amendment this needs is below; it joins this pull request before it leaves draft.
  • spec:AST-017 FR1 classes the change as breaking; FR6 does not let an approval reclassify it.

spec:AST-111 amendment this change needs

Apply to docs/specs/AST-111-calendar-systems/spec.md, which is on main (#9605).

FR2, replacing the current text:

  • FR2 — The application selects the calendar. A date component uses, in order: its own calendar prop; the calendar prop of its InternationalizationProvider; an explicit -u-ca- keyword in that provider's locale; otherwise gregory. A locale's default calendar never applies. The keyword islamic resolves to islamic-tbla, as ECMA-402 resolves it; a calendar prop takes only the FR1 identifiers. The calendar is independent of language, numbering, and direction: locale="en" calendar="persian" shows Persian dates in English, and locale="fa-IR" with no calendar shows Gregorian dates in Persian.

Example block, replacing the second provider:

{
  /* a -u-ca- keyword in the locale selects the calendar */
}
<InternationalizationProvider locale="th-TH-u-ca-buddhist">
  …
</InternationalizationProvider>;

Current-state impact: delete the bullet "A provider locale with a -u-ca- keyword keeps the Gregorian dates …", and add this item to the list under "Gregorian behavior that changes, with its spec:AST-017 class":

  • component:InternationalizationProvider FR10: a provider locale with an explicit -u-ca- keyword shows that calendar. Breaking (spec:AST-017 FR1): an application that wants Gregorian dates sets calendar="gregory". The same applies to component:Calendar, component:DateInput, component:DateRangeInput, component:DateTimeInput, and the FR18 formatters.

Verification map, row FR1–FR2:

| FR1–FR2 | Provider and component resolution tests | Every identifier; an unknown identifier, including a calendar="islamic" prop; -u-ca-islamic; an unsupported -u-ca- keyword; component over provider over -u-ca- over default; bare fa-IR | A bare locale selects a calendar, an explicit -u-ca- keyword is ignored, the precedence changes, or an unknown identifier throws |

DEC-2, replacing its last two paragraphs:

An explicit -u-ca- keyword in the provider's locale selects the calendar when no calendar prop does. The keyword is the application's own request, written into the locale it passes. Honoring it changes the output of an application that passes such a locale on the latest stable release, which spec:AST-017 FR1 classes as breaking, so it ships in a minor release with calendar="gregory" as the restoring prop.

Rejected: honoring the keyword in a patch, because spec:AST-017 FR6 does not let an approval reclassify a change FR1 calls breaking. Rejected: a calendar="from-locale" opt-in, because it adds a public value that repeats the default.

Public delta and caller burden

  • No new props, types, or exports.
  • Behavior: with no calendar prop on the provider or the component, a -u-ca- keyword in the provider's locale selects the calendar. A locale without the keyword, such as fa-IR, still shows Gregorian dates. A keyword outside CalendarSystem, such as islamic-rgsa, resolves to Gregorian and warns once in development. Values stay Gregorian ISO dates.
  • Compatibility: breaking (spec:AST-017 FR1). An application whose locale carries a -u-ca- keyword and that wants Gregorian dates sets calendar="gregory".

Before (0.7.x):

<InternationalizationProvider locale="th-TH-u-ca-buddhist">
  <DateInput label="Start date" value="2026-10-30" onChange={setDate} />
  {/* shows a Gregorian year */}
</InternationalizationProvider>

After (0.8.0):

<InternationalizationProvider locale="th-TH-u-ca-buddhist">
  <DateInput label="Start date" value="2026-10-30" onChange={setDate} />
  {/* shows Buddhist year 2569; the value stays '2026-10-30' */}
</InternationalizationProvider>

{/* to keep the Gregorian dates */}
<InternationalizationProvider locale="th-TH-u-ca-buddhist" calendar="gregory">
  …
</InternationalizationProvider>

The caller's one new decision: keep the keyword's calendar, or set calendar="gregory".

Design and alternatives

The provider reads the keyword with Intl.Locale#calendar and normalizes it through the same identifier check as the prop. Rejected alternatives are recorded in spec:AST-111 DEC-2 (amendment above): honoring the keyword in a patch release, and a calendar="from-locale" opt-in.

Evidence

packages/core/src/i18n/__tests__/calendarSystem.test.tsx, run without Temporal:

Case Result
th-TH-u-ca-buddhist, no prop buddhist
th-TH-u-ca-buddhist with a provider calendar (the Minguo calendar) the provider's calendar
the same, with component calendar="japanese" japanese
ar-u-ca-islamic islamic-tbla
ar-SA-u-ca-islamic-rgsa (unsupported keyword) gregory, one warning
bare fa-IR, bare th-TH gregory
calendar="islamic" prop gregory, warning

Storybook: CalendarSystems › PersianFromLocaleKeyword (fa-IR-u-ca-persian, no calendar) should show Persian months, and LocaleAloneStaysGregorian (fa-IR) Gregorian months. Not yet checked in a browser.

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Not yet in this pull request (these records and the guide are now on main):

Testing

  • pnpm exec tsc --noEmit -p packages/core: pass.
  • pnpm exec vitest run --maxWorkers=4 over packages/core/src/i18n, docPropLiterals.test.ts and the CLI core prop docs test, after the restack onto current main (with Lab's Schedule): 14 files, 136 tests pass. CI runs the full suites.
  • CLI docs tests (golden reads, core prop docs, core doc quality, core doc types) and docPropLiterals.test.ts: 5 files, 38 tests pass.
  • pnpm check:knowledge: pass.
  • pnpm check:changesets: rejects calendar-locale-keyword.md with "[breaking] cannot merge while main declares patch 0.7.9. Plan the minor first, or keep the change compatible through deprecation." This is expected until main declares 0.8.0.
  • Size: 272 authored lines against feat(DateRangeInput): show the range in the calendar #9653's branch before the stack merged; it now targets main with the same two commits.

Writing rubric results

component:InternationalizationProvider

  • R1 narration: none; FR10, ORD3, the Behavior and Compatibility rows, and the Calendar concept row state the resolution order in the present tense.
  • R2 research: none.
  • R3 evidence: the FR10/ORD3 verification row names test cases, not changes.
  • R4 rejected alternatives: none in the record.
  • R5 change references: none.
  • R6 open questions: OQ1–OQ4 are unanswered and unrelated to this change.

architecture:internationalization

  • R1 narration: none; INV10 states the resolution order.
  • R2 research: none.
  • R3 evidence: the INV10 verification row names tests.
  • R4 rejected alternatives: none touched.
  • R5 change references: none.
  • R6 open questions: none touched.

component:Calendar

  • R1 narration: none in the changed compatibility lines. The compatibility class keeps main's "additive optional calendar prop and hook option".
  • R2 research: none.
  • R3 evidence: no evidence cell changed.
  • R4 rejected alternatives: none.
  • R5 change references: none added. An existing verification cell quotes a test name; it names no pull request.
  • R6 open questions: none touched.

component:DateInput

  • R1 narration: none in the changed compatibility and migration lines. "Typed text proposes a date" in FR text describes behavior, not a change.
  • R2 research: none.
  • R3 evidence: no evidence cell changed.
  • R4 rejected alternatives: none.
  • R5 change references: none added. One existing verification cell quotes a test title that carries an issue number; left as is, outside this change.
  • R6 open questions: none touched.

component:DateTimeInput

  • R1 narration: none in the changed compatibility and migration lines.
  • R2 research: none.
  • R3 evidence: no evidence cell changed.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none touched.

component:DateRangeInput

  • R1 narration: none in the changed compatibility and migration lines.
  • R2 research: none.
  • R3 evidence: no evidence cell changed.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none touched.

@vercel

vercel Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 5, 2026 5:13am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 5, 2026, 5:22 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 4, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's spec decision. An explicit -u-ca- keyword in the InternationalizationProvider locale now selects the calendar, while the internationalization architecture on main says a locale must not select a different calendar and the calendar-systems spec the description wants amended is not merged. An engineering owner needs to approve or reject the proposed provider FR10 and ORD3 and architecture INV10 text: the keyword rule, the islamic to islamic-tbla alias, the fallback for an unsupported keyword, and the breaking class. To approve, the owner comments /approve-spec with the full head commit SHA (the author may do so as an engineering owner), or says what to change.

Required regardless of that decision:

  • Six unreleased Changesets on this branch (calendar-system-boundary.md, calendar-systems-core.md, calendar-typed-entry.md, calendar-bottom-sheet.md, calendar-native-fallback.md and calendar-presentations.md) still say a -u-ca- locale keeps Gregorian dates, contradicting the new [breaking] Changeset in the same release, so delete or reword that sentence in each and mention the touch-picker change in calendar-locale-keyword.md.

[Automated review]

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 37c9150 to 02527f4 Compare November 4, 2026 22:31
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from 48a0c64 to 470d85d Compare November 4, 2026 22:31
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 02527f4 to 6db495e Compare November 4, 2026 22:55
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from 470d85d to 8164323 Compare November 4, 2026 22:55
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 6db495e to 4f3aa42 Compare November 4, 2026 23:15
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from 8164323 to c5f702f Compare November 4, 2026 23:15

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's spec decision. The current InternationalizationProvider FR10 and ORD3 and internationalization INV10 say a -u-ca- keyword in the provider locale never selects the calendar, and this pull request intentionally rewrites them, so an engineering owner needs to update those records by approving or rejecting the keyword rule, the islamic to islamic-tbla alias, the Gregorian fallback with a warning for an unsupported keyword, and the breaking 0.8.0 class. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Required whatever the decision:

  • Amend the calendar-systems spec (docs/specs/AST-111-calendar-systems/spec.md) FR2, its example, its Current-state impact bullet, its FR1–FR2 verification row and DEC-2 in this pull request, because they still say a -u-ca- keyword never selects the calendar while the rewritten FR10 and INV10 cite AST-111 FR2 as their basis.
  • Delete or reword the -u-ca- sentence in the six pending Changesets that still say such a locale keeps Gregorian dates (calendar-system-boundary.md, calendar-systems-core.md, calendar-typed-entry.md, calendar-presentations.md, calendar-bottom-sheet.md and calendar-native-fallback.md), and add to calendar-locale-keyword.md that on touch screens DateInput and DateTimeInput under such a locale now open the bottom sheet instead of the native date control.

[Automated review]

| FR6 | Without a provider, the public context and hooks MUST expose locale `en`, direction `ltr`, an empty supplied-catalog map, and a translator backed by shipped English. | Released context and tests | settled |
| FR7 | The provider MUST preserve a string-returning translator suitable for visible and assistive attributes. | Released catalog/runtime contract | settled |
| FR8 | A nested provider MUST replace locale, messages, overrides, direction, and calendar with values derived solely from the child provider's own props rather than merge parent context. | Released provider and nested-provider tests | settled |
| FR10 | The provider MUST resolve its calendar from its `calendar` prop, else an explicit `-u-ca-` keyword in `locale`, else `gregory`, and expose it on the context as `calendar`. A locale's default calendar MUST NOT apply: `fa-IR` alone resolves to `gregory`, and `th-TH-u-ca-buddhist` resolves to `buddhist`. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; that alias does not apply to a `calendar` prop. The calendar is independent of language, numbering, and direction. `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput` follow the resolved calendar, and a component's own `calendar` prop takes precedence over the provider's. | `spec:AST-111` FR1, FR2 | settled |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR10 names spec:AST-111 FR1, FR2 as its basis, but AST-111 FR2 on this base still says a -u-ca- keyword never selects the calendar. Please add the FR2, example, Current-state impact, verification-row and DEC-2 amendment from the description to this pull request so the records agree.

display-calendar override remains a supported explicit caller choice.
date component shows the calendar that it resolves from its own `calendar`
prop, the provider's `calendar` prop, or an explicit `-u-ca-` keyword in the
provider's locale, and otherwise the Gregorian calendar (`spec:AST-111` FR2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INV10 cites spec:AST-111 FR2 for a rule that FR2 still states the other way round on this base; the AST-111 amendment needs to land with this change.

'@astryxdesign/core': minor
---

[breaking] A `-u-ca-` keyword in the `InternationalizationProvider` `locale` selects the calendar when the provider has no `calendar` prop. `th-TH-u-ca-buddhist` now shows Buddhist years in `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput`, where it showed Gregorian dates before. A component's `calendar` prop and the provider's `calendar` prop still take precedence. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; a `calendar="islamic"` prop stays an unknown identifier. A keyword outside `CalendarSystem` resolves to Gregorian and warns once in development. A locale without the keyword, such as `fa-IR`, still shows Gregorian dates. Date values stay Gregorian ISO strings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under a -u-ca- locale, DateInput and DateTimeInput on a touch screen now open the bottom sheet instead of the native date control, and an explicit presentation="native" shows the Astryx picker and warns. Please say so here, and remove the "keeps Gregorian dates" sentence from the six other pending calendar Changesets.

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 4f3aa42 to 351ec9c Compare November 5, 2026 00:59
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from c5f702f to 591a7f0 Compare November 5, 2026 00:59

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's spec decision. The current InternationalizationProvider FR10 and ORD3 and internationalization INV10 say a -u-ca- keyword in the provider locale never selects the calendar, and this pull request intentionally rewrites them, so an engineering owner needs to update those records by approving or rejecting the keyword rule, the islamic to islamic-tbla alias, the Gregorian fallback with a warning for an unsupported keyword, and the breaking 0.8.0 class. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Required whatever the decision:

  • Amend the calendar-systems spec (docs/specs/AST-111-calendar-systems/spec.md) FR2, its example, its Current-state impact bullet, its FR1–FR2 verification row and DEC-2 in this pull request, because they still say a -u-ca- keyword never selects the calendar while the rewritten FR10 and INV10 cite AST-111 FR2 as their basis.
  • Delete or reword the -u-ca- sentence in the six pending Changesets that still say such a locale keeps Gregorian dates (calendar-system-boundary.md, calendar-systems-core.md, calendar-typed-entry.md, calendar-presentations.md, calendar-bottom-sheet.md and calendar-native-fallback.md), and add to calendar-locale-keyword.md that on touch screens DateInput and DateTimeInput under such a locale now open the bottom sheet instead of the native date control.

[Automated review]

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 351ec9c to 103c7e5 Compare November 5, 2026 02:27
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from 591a7f0 to f11dd36 Compare November 5, 2026 02:27
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 103c7e5 to b83b6c0 Compare November 5, 2026 02:53
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from f11dd36 to 479fe46 Compare November 5, 2026 02:53
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from b83b6c0 to 296ad4b Compare November 5, 2026 03:08
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from 479fe46 to 82c6836 Compare November 5, 2026 03:08

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's spec decision. The current InternationalizationProvider FR10 and ORD3 and internationalization INV10 say a -u-ca- keyword in the provider locale never selects the calendar, and this pull request intentionally rewrites them. An engineering owner needs to update those records by approving or rejecting the keyword rule, the islamic to islamic-tbla alias, the Gregorian fallback with a warning for an unsupported keyword, and the breaking 0.8.0 class. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Required whatever the decision:

  • Regression: the Timestamp test keeps Gregorian dates for a -u-ca- keyword in the provider locale (Timestamp.test.tsx:1843-1848) now fails because Timestamp writes 30 ตุลาคม 2569 under th-TH-u-ca-buddhist, so update it to expect the keyword's calendar and add a matching PowerSearch keyword test.
  • Regression: the Timestamp and PowerSearch records (Timestamp.spec.md:47 and :65-67, PowerSearch.spec.md:90-92) and the Calendars guide (packages/cli/assets/docs/tree/calendar-systems.doc.mjs:30) still say a -u-ca- keyword keeps Gregorian dates, so give them the compatibility line and migration the four date-component records get.
  • Amend docs/specs/AST-111-calendar-systems/spec.md FR2, its example, its Current-state impact bullet, its FR1–FR2 verification row and DEC-2 in this pull request, because they still say the keyword never selects the calendar while the rewritten FR10 and INV10 cite AST-111 FR2 as their basis.
  • Delete or reword the -u-ca- sentence in the six pending Changesets that still say such a locale keeps Gregorian dates (calendar-system-boundary.md, calendar-systems-core.md, calendar-typed-entry.md, calendar-presentations.md, calendar-bottom-sheet.md and calendar-native-fallback.md), and add to calendar-locale-keyword.md that on touch screens DateInput and DateTimeInput under such a locale now open the bottom sheet instead of the native date control.
  • Regression: also reword calendar-systems-formatters.md and calendar-schedule.md, which say the keyword keeps Gregorian dates or that a locale never selects the calendar, and add Timestamp, PowerSearch and Lab Schedule dates to calendar-locale-keyword.md.

Non-blocking: Calendar.spec.md:78-81 still calls the compatibility class "no default ... change" in the bullet that now says the keyword change is breaking.

[Automated review]

? resolveCalendarSystem(calendarProp, PROVIDER_NAME)
: 'gregory',
[calendarProp],
: (getExplicitLocaleCalendar(locale, PROVIDER_NAME) ?? 'gregory'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resolved calendar also reaches Timestamp, PowerSearch and Lab Schedule through useCalendarSystem, so the base's Timestamp test keeps Gregorian dates for a -u-ca- keyword in the provider locale (Timestamp.test.tsx:1843-1848) fails on this head: it receives 30 ตุลาคม 2569. Please update that test, add a PowerSearch keyword test, and amend the Timestamp and PowerSearch compatibility lines.

| FR6 | Without a provider, the public context and hooks MUST expose locale `en`, direction `ltr`, an empty supplied-catalog map, and a translator backed by shipped English. | Released context and tests | settled |
| FR7 | The provider MUST preserve a string-returning translator suitable for visible and assistive attributes. | Released catalog/runtime contract | settled |
| FR8 | A nested provider MUST replace locale, messages, overrides, direction, and calendar with values derived solely from the child provider's own props rather than merge parent context. | Released provider and nested-provider tests | settled |
| FR10 | The provider MUST resolve its calendar from its `calendar` prop, else an explicit `-u-ca-` keyword in `locale`, else `gregory`, and expose it on the context as `calendar`. A locale's default calendar MUST NOT apply: `fa-IR` alone resolves to `gregory`, and `th-TH-u-ca-buddhist` resolves to `buddhist`. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; that alias does not apply to a `calendar` prop. The calendar is independent of language, numbering, and direction. `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput` follow the resolved calendar, and a component's own `calendar` prop takes precedence over the provider's. | `spec:AST-111` FR1, FR2 | settled |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR10 names spec:AST-111 FR1, FR2 as its basis, but AST-111 FR2 on this base still says a -u-ca- keyword never selects the calendar. Please add the FR2, example, Current-state impact, verification-row and DEC-2 amendment the description drafts.

display-calendar override remains a supported explicit caller choice.
date component shows the calendar that it resolves from its own `calendar`
prop, the provider's `calendar` prop, or an explicit `-u-ca-` keyword in the
provider's locale, and otherwise the Gregorian calendar (`spec:AST-111` FR2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INV10 cites spec:AST-111 FR2 for a rule that FR2 still states the other way round on this base; the AST-111 amendment needs to land with this change.

'@astryxdesign/core': minor
---

[breaking] A `-u-ca-` keyword in the `InternationalizationProvider` `locale` selects the calendar when the provider has no `calendar` prop. `th-TH-u-ca-buddhist` now shows Buddhist years in `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput`, where it showed Gregorian dates before. A component's `calendar` prop and the provider's `calendar` prop still take precedence. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; a `calendar="islamic"` prop stays an unknown identifier. A keyword outside `CalendarSystem` resolves to Gregorian and warns once in development. A locale without the keyword, such as `fa-IR`, still shows Gregorian dates. Date values stay Gregorian ISO strings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one place release readers learn about the break (spec:AST-017 FR31), but it names only Calendar and the three date fields: Timestamp, PowerSearch and Lab Schedule dates change too, and on touch screens DateInput and DateTimeInput under a keyword locale open the bottom sheet instead of the native date control. Eight other pending Changesets still say the keyword keeps Gregorian dates.

@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-presentations branch from 296ad4b to 9c1c0f7 Compare November 5, 2026 03:54

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's spec decision. The current InternationalizationProvider FR10 and ORD3 and internationalization INV10 say a -u-ca- keyword in the provider locale never selects the calendar, and this pull request intentionally rewrites them. An engineering owner needs to update those records by approving or rejecting the keyword rule, the islamic to islamic-tbla alias, the Gregorian fallback with a warning for an unsupported keyword, and the breaking 0.8.0 class. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Required whatever the decision:

  • The Timestamp test keeps Gregorian dates for a -u-ca- keyword in the provider locale (Timestamp.test.tsx:1843-1848) fails on this head because Timestamp now writes 30 ตุลาคม 2569 under th-TH-u-ca-buddhist, and the Timestamp and PowerSearch records (Timestamp.spec.md:47 and :65-67, PowerSearch.spec.md:90-92) and the Calendars guide (calendar-systems.doc.mjs:30) still say the keyword keeps Gregorian dates, so update that test, add a PowerSearch keyword test, and give those records and the guide the compatibility line and migration the four date-component records get.
  • Amend docs/specs/AST-111-calendar-systems/spec.md FR2, its example, its Current-state impact bullet, its FR1–FR2 verification row and DEC-2 in this pull request, because the rewritten FR10 and INV10 cite AST-111 FR2 as their basis while it still says the opposite.
  • Add the Timestamp, PowerSearch and touch-screen picker changes (the native date control gives way to the bottom sheet under a keyword locale) to calendar-locale-keyword.md, the one place release readers learn about this break, and reword the "keeps Gregorian dates" sentence in each pending calendar Changeset that will ship in the same release.

[Automated review]

? resolveCalendarSystem(calendarProp, PROVIDER_NAME)
: 'gregory',
[calendarProp],
: (getExplicitLocaleCalendar(locale, PROVIDER_NAME) ?? 'gregory'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resolved calendar also reaches Timestamp and PowerSearch through useCalendarSystem, so the base's Timestamp test keeps Gregorian dates for a -u-ca- keyword in the provider locale (Timestamp.test.tsx:1843-1848) fails on this head: it receives 30 ตุลาคม 2569. Please update that test, add a PowerSearch keyword test, and amend the Timestamp and PowerSearch compatibility lines and the Calendars guide.

| FR6 | Without a provider, the public context and hooks MUST expose locale `en`, direction `ltr`, an empty supplied-catalog map, and a translator backed by shipped English. | Released context and tests | settled |
| FR7 | The provider MUST preserve a string-returning translator suitable for visible and assistive attributes. | Released catalog/runtime contract | settled |
| FR8 | A nested provider MUST replace locale, messages, overrides, direction, and calendar with values derived solely from the child provider's own props rather than merge parent context. | Released provider and nested-provider tests | settled |
| FR10 | The provider MUST resolve its calendar from its `calendar` prop, else an explicit `-u-ca-` keyword in `locale`, else `gregory`, and expose it on the context as `calendar`. A locale's default calendar MUST NOT apply: `fa-IR` alone resolves to `gregory`, and `th-TH-u-ca-buddhist` resolves to `buddhist`. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; that alias does not apply to a `calendar` prop. The calendar is independent of language, numbering, and direction. `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput` follow the resolved calendar, and a component's own `calendar` prop takes precedence over the provider's. | `spec:AST-111` FR1, FR2 | settled |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR10 names spec:AST-111 FR1, FR2 as its basis, but AST-111 FR2 still says a -u-ca- keyword never selects the calendar. Please add the FR2, example, Current-state impact, verification-row and DEC-2 amendment the description drafts.

display-calendar override remains a supported explicit caller choice.
date component shows the calendar that it resolves from its own `calendar`
prop, the provider's `calendar` prop, or an explicit `-u-ca-` keyword in the
provider's locale, and otherwise the Gregorian calendar (`spec:AST-111` FR2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INV10 cites spec:AST-111 FR2 for a rule that FR2 still states the other way round; the AST-111 amendment needs to land with this change.

'@astryxdesign/core': minor
---

[breaking] A `-u-ca-` keyword in the `InternationalizationProvider` `locale` selects the calendar when the provider has no `calendar` prop. `th-TH-u-ca-buddhist` now shows Buddhist years in `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput`, where it showed Gregorian dates before. A component's `calendar` prop and the provider's `calendar` prop still take precedence. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; a `calendar="islamic"` prop stays an unknown identifier. A keyword outside `CalendarSystem` resolves to Gregorian and warns once in development. A locale without the keyword, such as `fa-IR`, still shows Gregorian dates. Date values stay Gregorian ISO strings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one place release readers learn about the break (spec:AST-017 FR31), but it names only Calendar and the three date fields: Timestamp and PowerSearch dates change too, and on touch screens DateInput and DateTimeInput under a keyword locale use the bottom sheet instead of the native date control. Pending calendar Changesets that ship in the same release still say the keyword keeps Gregorian dates.

…ndar

The provider resolves its calendar from its calendar prop, else an
explicit -u-ca- keyword in its locale, else gregory. A component's own
calendar prop still comes first. The keyword islamic resolves to
islamic-tbla, as ECMA-402 resolves it; the alias does not apply to a
calendar prop, so calendar="islamic" stays an unknown identifier. A
keyword outside CalendarSystem resolves to gregory and warns once.

th-TH-u-ca-buddhist showed Gregorian dates before, so this is breaking:
an application that wants Gregorian dates sets calendar="gregory". The
provider, Calendar, DateInput, DateTimeInput and DateRangeInput records,
architecture INV10, the provider docs, and the story say so.
A [breaking] minor Changeset with the migration. check:changesets rejects
it while main declares a patch version; it passes once main declares the
0.8.0 minor.
@nynexman4464
nynexman4464 changed the base branch from nynexman4464/feat/calendar-presentations to main November 5, 2026 05:01
@nynexman4464
nynexman4464 force-pushed the nynexman4464/feat/calendar-locale-keyword branch from 294f4a5 to b06bfd5 Compare November 5, 2026 05:01
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current CI run concluded skipped. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's spec decision. The current InternationalizationProvider FR10 and ORD3 and internationalization INV10 say a -u-ca- keyword in the provider locale never selects the calendar, and this pull request intentionally rewrites them. An engineering owner needs to update those records by approving or rejecting the keyword rule, the islamic to islamic-tbla alias, the Gregorian fallback with a warning for an unsupported keyword, and the breaking 0.8.0 class. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.

Required whatever the decision:

  • The Timestamp test keeps Gregorian dates for a -u-ca- keyword in the provider locale (Timestamp.test.tsx:1843-1848) fails on this head because Timestamp now writes 30 ตุลาคม 2569 under th-TH-u-ca-buddhist, and the Timestamp and PowerSearch records (Timestamp.spec.md:47 and :65-67, PowerSearch.spec.md:90-92) and the Calendars guide (calendar-systems.doc.mjs:30) still say the keyword keeps Gregorian dates, so update that test, add a PowerSearch keyword test, and give those records and the guide the compatibility line and migration the four date-component records get.
  • Amend docs/specs/AST-111-calendar-systems/spec.md FR2, its example, its Current-state impact bullet, its FR1–FR2 verification row and DEC-2 in this pull request, because the rewritten FR10 and INV10 cite AST-111 FR2 as their basis while it still says the opposite.
  • Add the Timestamp, PowerSearch and touch-screen picker changes (the native date control gives way to the bottom sheet under a keyword locale) to calendar-locale-keyword.md, the one place release readers learn about this break, and reword the "keeps Gregorian dates" sentence in each pending calendar Changeset that will ship in the same release.

Smaller record fixes, not blocking:

  • The Calendar and DateInput compatibility classes still say the default is unchanged.
  • Miss: the provider record's ownership line still says the calendar resolves from calendar alone.

[Automated review]

? resolveCalendarSystem(calendarProp, PROVIDER_NAME)
: 'gregory',
[calendarProp],
: (getExplicitLocaleCalendar(locale, PROVIDER_NAME) ?? 'gregory'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This resolved calendar also reaches Timestamp and PowerSearch through useCalendarSystem, so the base's Timestamp test keeps Gregorian dates for a -u-ca- keyword in the provider locale (Timestamp.test.tsx:1843-1848) fails on this head: it receives 30 ตุลาคม 2569. Please update that test, add a PowerSearch keyword test, and give the Timestamp and PowerSearch records and the Calendars guide the same compatibility line.

| FR6 | Without a provider, the public context and hooks MUST expose locale `en`, direction `ltr`, an empty supplied-catalog map, and a translator backed by shipped English. | Released context and tests | settled |
| FR7 | The provider MUST preserve a string-returning translator suitable for visible and assistive attributes. | Released catalog/runtime contract | settled |
| FR8 | A nested provider MUST replace locale, messages, overrides, direction, and calendar with values derived solely from the child provider's own props rather than merge parent context. | Released provider and nested-provider tests | settled |
| FR10 | The provider MUST resolve its calendar from its `calendar` prop, else an explicit `-u-ca-` keyword in `locale`, else `gregory`, and expose it on the context as `calendar`. A locale's default calendar MUST NOT apply: `fa-IR` alone resolves to `gregory`, and `th-TH-u-ca-buddhist` resolves to `buddhist`. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; that alias does not apply to a `calendar` prop. The calendar is independent of language, numbering, and direction. `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput` follow the resolved calendar, and a component's own `calendar` prop takes precedence over the provider's. | `spec:AST-111` FR1, FR2 | settled |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR10 names spec:AST-111 FR1, FR2 as its basis, but AST-111 FR2 still says a -u-ca- keyword never selects the calendar. Please add the FR2, example, Current-state impact, verification-row and DEC-2 amendment the description drafts.

display-calendar override remains a supported explicit caller choice.
date component shows the calendar that it resolves from its own `calendar`
prop, the provider's `calendar` prop, or an explicit `-u-ca-` keyword in the
provider's locale, and otherwise the Gregorian calendar (`spec:AST-111` FR2).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INV10 cites spec:AST-111 FR2 for a rule that FR2 still states the other way round; the AST-111 amendment needs to land with this change.

'@astryxdesign/core': minor
---

[breaking] A `-u-ca-` keyword in the `InternationalizationProvider` `locale` selects the calendar when the provider has no `calendar` prop. `th-TH-u-ca-buddhist` now shows Buddhist years in `Calendar`, `DateInput`, `DateRangeInput`, and `DateTimeInput`, where it showed Gregorian dates before. A component's `calendar` prop and the provider's `calendar` prop still take precedence. The keyword `islamic` resolves to `islamic-tbla`, as ECMA-402 resolves it; a `calendar="islamic"` prop stays an unknown identifier. A keyword outside `CalendarSystem` resolves to Gregorian and warns once in development. A locale without the keyword, such as `fa-IR`, still shows Gregorian dates. Date values stay Gregorian ISO strings.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one place release readers learn about the break (spec:AST-017 FR31), but it names only Calendar and the three date fields: Timestamp and PowerSearch dates change too, and on touch screens DateInput and DateTimeInput under a keyword locale use the bottom sheet instead of the native date control. Please add both.

This branch was successfully deployed

1 active deployment
Preview — b06bfd54 Deployed Nov 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant