Skip to content

fix(locale): force Gregorian date formatting - #652

Open
KristjanESPERANTO wants to merge 2 commits into
opening-hours:mainfrom
KristjanESPERANTO:gregorian
Open

fix(locale): force Gregorian date formatting#652
KristjanESPERANTO wants to merge 2 commits into
opening-hours:mainfrom
KristjanESPERANTO:gregorian

Conversation

@KristjanESPERANTO

@KristjanESPERANTO KristjanESPERANTO commented Aug 13, 2026

Copy link
Copy Markdown
Member

While working on PR #649, I noticed that prettifyValue() could format Gregorian dates using a locale's default calendar. For example, Farsi could format Mar 06-Jul 15 as 6 اسفند (Esfand)-15 تیر (Tir) instead of 6 مارس (March)-15 ژوئیه (July). Esfand and Tir are months in the Persian calendar, not the Gregorian months March and July, so this mixed up two calendar systems.

The output now explicitly uses the Gregorian calendar while preserving localized names and formatting. The tests also introduce addPrettifyValueForLocale, so locale-specific regression tests always run independently of the selected test locale.

@HolgerJeromin HolgerJeromin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good catch!

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