Issue with Ethiopian Calendar Conversion in DHIS2 Data Visualizer

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/polyfill or 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.

Hi @nuredinmuhammed176

Thanks for the detailed post. I just want to double check the following:

  • Are you using the latest version of the Data Visualizer app and one of the supported versions of DHIS2? Please use the App Management app to update the Data Visualizer app, here’s an example guide, Event Reports to Line Listing - DHIS2 Documentation. And please make sure you are using one of the latest supported DHIS2 versions, Upgrade Guide - DHIS2 Documentation.

  • If you can reproduce this in one of the play.dhis2.org instances, would you kindly share the steps to reproduce? We might then be able to create a Jira bug issue and triage this to the team.

Thanks!

Hi @nuredinmuhammed176,

This is a known issue which is currently in progress but might take some time to get fixed - Jira - maybe @kpvandivier or @mozafar can add some more insight.

I am not sure if the LIBS project is open for all users, so adding a screenshot here:

Thanks @Karoline ! :folded_hands: