Skip to content

Stdlib: IntlDateFormatter @calendar= TRADITIONAL via ICU udat (#22877)#22972

Merged
PurHur merged 1 commit into
masterfrom
fix/22877-datefmt-calendar-locale-keyword
Jul 25, 2026
Merged

Stdlib: IntlDateFormatter @calendar= TRADITIONAL via ICU udat (#22877)#22972
PurHur merged 1 commit into
masterfrom
fix/22877-datefmt-calendar-locale-keyword

Conversation

@PurHur

@PurHur PurHur commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #22877

php-src reference

  • ext/intl/dateformat/dateformat_create.cppudat_open(timeStyle, dateStyle, locale, …) + calendar from locale when TRADITIONAL
  • ICU calendar keyword in locale ID

PHP implementation

  • ext/intl/IcuDateFormat.php — udat_* FFI
  • ext/intl/VmIntlDateFormatter.phpusesLocaleCalendarKeyword / formatResolved

Test plan

  • php bin/vm.php test/repro/issue_22877_datefmt_calendar_locale.php → Tevet / AH / Shōwa / BE
  • vendor/bin/phpunit --filter intldateformatter_calendar_locale → OK
  • Related style/localtime filters still green

Batch: after #22870; next #22855.

Made with Cursor

Honor locale calendar keywords for hebrew/islamic/japanese/buddhist with a
thin libicui18n udat_open/format FFI path (php-src dateformat_create.cpp).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 5298299 into master Jul 25, 2026
1 check failed
@PurHur
PurHur deleted the fix/22877-datefmt-calendar-locale-keyword branch July 25, 2026 09:28
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.

Regression: IntlDateFormatter locale @calendar=hebrew/islamic/japanese/buddhist — formats Gregorian (ext/intl/dateformat)

1 participant