Subject: Issue with Ethiopian Calendar Conversion in DHIS2 Data Visualizer
Message: Hello DHIS2 community,
We have encountered a recurring error in the Data Visualizer module related to calendar conversion:
Code
RangeError: Era am (ISO year 2018) was not matched by any era
This error appears when DHIS2 attempts to convert ISO/Gregorian dates into the Ethiopian calendar. Specifically, the system fails to map ISO year 2018 to the expected Ethiopian era year, causing visualizations to break.
Key points:
- The error is triggered when the system is configured to use the Ethiopian calendar.
- It seems to be a mismatch between dataset dates stored in Gregorian format and the Ethiopian calendar conversion logic.
- Switching the user calendar setting to Gregorian temporarily resolves the issue, but this is not a long-term fix.
- The problem likely originates from the date conversion library (
@js-temporal/polyfillor similar) used in DHIS2.
Impact: Users relying on the Ethiopian calendar cannot properly visualize data for certain years (e.g., 2018).
Request:
- Has anyone else experienced this issue in their DHIS2 instance?
- Are there known patches or configuration adjustments that resolve the Ethiopian calendar conversion mismatch?
- Any guidance from the core team or community contributors would be appreciated.
