fix: add updated era codes to EthiopicHelper#357
Open
kabaros wants to merge 1 commit into
Open
Conversation
Author
|
@ptomato I'd appreciate a review please for this one as it completely broke the Ethiopian calendar for us (or a workaround if there is one!) .. thank you in advance 🙏🏿 |
Contributor
|
@kabaros |
This adds the updated era codes for Ethiopic calendar to reflect the updates in CLDR48 https://cldr.unicode.org/downloads/cldr-48#identifiers
ptomato
approved these changes
Mar 31, 2026
dhis2-bot
added a commit
to dhis2/multi-calendar-dates
that referenced
this pull request
Jul 2, 2026
## [2.1.3-alpha.1](v2.1.2...v2.1.3-alpha.1) (2026-07-02) ### Bug Fixes * **build:** add rootDir and exclude vendor from tsconfig for TS 6.0 ([6a7b2dc](6a7b2dc)) * **ci:** upgrade to Node 20, fix lint errors and formatting ([5fc57bc](5fc57bc)) * **ci:** wire @js-temporal/polyfill-patched alias for cucumber runner ([7864a75](7864a75)) * **ethiopic:** vendor @js-temporal/polyfill with CLDR 48 era-code patch ([ec948fa](ec948fa)), closes [js-temporal/temporal-polyfill#357](js-temporal/temporal-polyfill#357) * **translations:** sync translations from transifex (main) ([d202f08](d202f08)) * **translations:** sync translations from transifex (main) ([155c81e](155c81e)) * **translations:** sync translations from transifex (main) ([d8e719e](d8e719e))
dhis2-bot
added a commit
to dhis2/multi-calendar-dates
that referenced
this pull request
Jul 2, 2026
# [2.2.0-alpha.1](v2.1.2...v2.2.0-alpha.1) (2026-07-02) ### Bug Fixes * **build:** add rootDir and exclude vendor from tsconfig for TS 6.0 ([6a7b2dc](6a7b2dc)) * **ci:** upgrade to Node 20, fix lint errors and formatting ([5fc57bc](5fc57bc)) * **ci:** wire @js-temporal/polyfill-patched alias for cucumber runner ([7864a75](7864a75)) * **ethiopic:** vendor @js-temporal/polyfill with CLDR 48 era-code patch ([ec948fa](ec948fa)), closes [js-temporal/temporal-polyfill#357](js-temporal/temporal-polyfill#357) * **translations:** sync translations from transifex (main) ([d202f08](d202f08)) * **translations:** sync translations from transifex (main) ([155c81e](155c81e)) * **translations:** sync translations from transifex (main) ([d8e719e](d8e719e)) ### Features * trigger publish ([19fe19c](19fe19c))
kabaros
added a commit
to dhis2/multi-calendar-dates
that referenced
this pull request
Jul 5, 2026
0.5.x removed Temporal.Calendar/Temporal.TimeZone as registerable classes entirely - calendars are now plain string identifiers, and Nepali (the one non-CLDR calendar this library supports) can no longer be registered as a Temporal.Calendar subclass. - Vendor 0.5.1 source into src/vendor/temporal/, porting the Ethiopic CLDR 48/ICU 76 era-code fix (js-temporal/temporal-polyfill#357, still unmerged upstream) to the new calendar module shape. - Rewrite Nepali support as a standalone NepaliPlainDate class (src/custom-calendars/nepaliCalendar.ts) wrapping a real ISO Temporal.PlainDate, reproducing the old NepaliCalendar's exact "ISO arithmetic, then reconvert" behaviour rather than "fixing" it, since existing workarounds (day-14 clamping) depend on it. - Introduce AnyPlainDate (Temporal.PlainDate | NepaliPlainDate, src/utils/plainDate.ts) plus a customPlainDateImplementations registry, so hooks/period-calculation code no longer needs to know whether a given calendar is Nepali or a real Temporal calendar. - Switch useDatePicker's internal representation from Temporal.ZonedDateTime to Temporal.PlainDate/NepaliPlainDate - a date picker never needed time-of-day/timezone semantics. BREAKING CHANGE: getNowInCalendar now returns a plain CalendarDate object ({ year, month, day, eraYear? }, src/types.ts) instead of a Temporal.ZonedDateTime. This removes Temporal from the public interface entirely and matches convertFromIso8601/convertToIso8601's existing return shape. Code that only read .year/.month/.day/.eraYear needs no changes; code that called Temporal methods on the result needs to re-derive another date via getNowInCalendar/convertFromIso8601 instead of calling .withCalendar()/.startOfDay() on the previous result. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
dhis2-bot
added a commit
to dhis2/multi-calendar-dates
that referenced
this pull request
Jul 6, 2026
# [3.0.0-alpha.1](v2.2.0-alpha.3...v3.0.0-alpha.1) (2026-07-06) * feat(temporal)!: upgrade @js-temporal/polyfill to 0.5.1 ([ade19d5](ade19d5)), closes [js-temporal/temporal-polyfill#357](js-temporal/temporal-polyfill#357) ### BREAKING CHANGES * getNowInCalendar now returns a plain CalendarDate object ({ year, month, day, eraYear? }, src/types.ts) instead of a Temporal.ZonedDateTime. This removes Temporal from the public interface entirely and matches convertFromIso8601/convertToIso8601's existing return shape. Code that only read .year/.month/.day/.eraYear needs no changes; code that called Temporal methods on the result needs to re-derive another date via getNowInCalendar/convertFromIso8601 instead of calling .withCalendar()/.startOfDay() on the previous result. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the updated era codes for Ethiopic calendar to reflect the updates in CLDR48 https://cldr.unicode.org/downloads/cldr-48#identifiers
Dealing with Ethiopian calendars started failing in the polyfill in versions of node after 20.19 (and after recent browser updates in Firefox) as ICU updated the era codes: https://unicode-org.atlassian.net/browse/ICU-23167. In the polyfill code, the
ecamscriptmodule seems to delegate to call thecalendarmodule passing the updated era code, but thecalendarmodule then can't match the era code failing withRangeError: Era am (ISO year 2016) was not matched by any era.We observed the failure on CI first as node updated the ICU, but then it started failing on Firefox after an update. It currently works on Chrome stable, but fails with the same error on Canary: https://developers.dhis2.org/demo/?path=/story/calendarinput--ethiopic-with-amharic