Skip to content

intl: make DateTimeFormat/NumberFormat callable without new (ECMA-402 legacy behavior) - #117

Merged
syrusakbary merged 1 commit into
mainfrom
fix/intl-legacy-callable
Jul 15, 2026
Merged

intl: make DateTimeFormat/NumberFormat callable without new (ECMA-402 legacy behavior)#117
syrusakbary merged 1 commit into
mainfrom
fix/intl-legacy-callable

Conversation

@Arshia001

Copy link
Copy Markdown
Member

Split out of #112.

ECMA-402 requires Intl.DateTimeFormat(...) and Intl.NumberFormat(...) to work when called as plain functions (legacy behavior equivalent to new). The QuickJS provider's ICU-backed Intl only supported construction with new; date-fns and other libraries call Intl.DateTimeFormat().resolvedOptions() without it.

🤖 Generated with Claude Code

… legacy behavior)

Umami's isValidTimezone calls Intl.DateTimeFormat(undefined, {timeZone}) as a
plain function; the stub threw, rejecting every timezone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@syrusakbary
syrusakbary merged commit 465e4e5 into main Jul 15, 2026
10 checks passed
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