Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion website/src/routes/demo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ function DemoApp() {

const handleMonthChange = useCallback(
(month: Temporal.PlainYearMonth) => {
const formatted = month.toLocaleString(locale, {
// Format through a PlainDate: a `PlainYearMonth` with the ISO calendar
// throws when toLocaleString resolves a different locale calendar (e.g.
// gregory for en-US). An ISO `PlainDate` renders in the locale calendar.
const formatted = month.toPlainDate({ day: 1 }).toLocaleString(locale, {
month: "long",
year: "numeric",
});
Expand Down
Loading