fix: respect locale date order for Asian languages in DatePresenter #10779
Problem
DatePresenter and DateRangePresenter were hardcoding the Western day-month-year display order (25 Mar 2025) by manually concatenating date parts in the template. This ignored the user's locale, causing incorrect and confusing date display for Asian languages:
Korean (ko): should be 2025년 3월 25일 Japanese (ja): should be 2025年3月25日 Chinese (zh): should be 2025年3月25日
Solution Added a formatDate() utility in DateUtils.ts that uses Intl.DateTimeFormat with the browser's resolved locale, which natively produces the correct ordering for all languages.
Replaced all hardcoded {day} {month} {year} template concatenations with formatDate() in:
DatePresenter.svelte DateRangePresenter.svelte (both inline and button display modes)
Testing Set browser language to Japanese/Korean/Chinese and verify dates render in correct YYYY-MM-DD hierarchy Verify Western locales (en, fr, de) still display correctly as Mar 25 or Mar 25, 2025
Connected to Huly®: UBERF-16321
@Learnobug Thank you for your contribution. Could you please fix formatting (cd packages/ui && rushx format -f)
Playwright e2e test failure is unrelated to this change — it requires a running server at localhost:3003 which is unavailable in CI for fork PRs. The formatting fix has been applied. All changes are scoped to DateUtils.ts, DatePresenter.svelte, and DateRangePresenter.svelte