Skip to content

Intl.DateTimeFormat('de-CH', {year, month}) outputs different separators between Node 24.13.0 and 24.13.1 #61861

@talamcol

Description

@talamcol

Version

24.13.1

Platform

Darwin N22134 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:48:41 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6041 arm64

Subsystem

No response

What steps will reproduce the bug?

Intl.DateTimeFormat produces inconsistent formatting for partial date options (year + month) between Node 24.13.0 and 24.13.1.
• Node 24.13.0 outputs '12.2021' (dot separator) as expected for de-CH.
• Node 24.13.1 outputs '12/2021' (slash separator) for the same code.
• Adding day: '2-digit' produces consistent '07.12.2021' in both versions.

This behavior change breaks SSR/client hydration in frameworks like Next.js when formatting dates for de-CH locale.

Reproduction:

// Test partial month/year formatting
console.log(
  new Intl.DateTimeFormat('de-CH', { year: 'numeric', month: '2-digit' }).format(new Date("2021-12-07"))
);

// Test full date formatting
console.log(
  new Intl.DateTimeFormat('de-CH', { year: 'numeric', month: '2-digit', day: '2-digit' }).format(new Date("2021-12-07"))
);

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Both Node versions should produce '12.2021' for { year, month } in de-CH locale.
Separator should follow locale conventions consistently, even for partial formats.

What do you see instead?

Node 24.13.1 outputs '12/2021'

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    i18n-apiIssues and PRs related to the i18n implementation.icuIssues and PRs related to the ICU dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions