Persian calendar

Hello dears

we want to set up dhis2 in health centers of Iran but unfortunately Persian calendar doesn’t work correctly.
may i akk you to help us about Persian calendar.
I send you URL of Persian calendar structure for Iran



Hi @lida_afshari,

The Persian calendar was integrated in the DHIS2 - version 2.28, where it was fully functional. However, with the later upgrades, some bugs were introduced, which are being fixed by the development team.

Below are the current issues on Jira:

Afghanistan team is awaiting these fixes as well, to start the national pilot.

1 Like

hi baktash

you mean in 2.28 version persian calendar is correct?

may I ask you when it will be ready for 2.31 version?

thanks alot

1 Like

Hi @I_rw,

Yes in 2.28 it is fully functional.

We are in contact with Oslo team for make it functional in current versions also, hope to soon get a response for it.

1 Like

thank you for your reply

if we install 2.8 is it enough to change calandar setting to persian or need to re install persian postgre?

thankyou so much for your help

1 Like

HI @I_rw,

At first check the
solar calendar in a clean instance, if
everything is working properly for you in 2.28. Then for your available
instance which has the Gregorian period
data follow the below steps before changing the calendar to solar:

  • clear analytics
  • prune periods
  •  change the war file to 2.28.  If your current
    DHIS2 is in above 2.28 then you can not downgrade it, you may need to
    create a clean instance with 2.28 and import all your metadata and for the
    importation of data following steps
    will help:
    When you importing the DHIS2 metadata from one instance
    to another it will remain with the same
    UID but ID is changed.

For aggregate data, it stores the IDs with value in
the datavalue table in DHIS2.

create a table which takes all necessary uids and values based on datavalue
table dhis2, and insert all of your datavalue
table data to the newly created table. then
take a back up of only the newly created table
and restore in your new instance. once you restored, write a query to select
all necessary information from the restored
table and insert it into datavalue using uids.

Finally: write a query or function to change your
Gregorian available periods in the period table to the solar calendar.

Note: consider the period type also in the conversion of dates and once the conversion is done change the
calendar to solar and run your analytics.

if you need any further assistance
you can also contact me through my personal Skype (bakosalehi)


Baktash Salehi


HI baktash
really thanks for your complete description
we don’t have more data and meta data and all of them are test instance, we are going to install 2.28 at another server and check Persian calendar, because it is so important to us to have correct date, before being sure about that we can’t continue and implement in other centers.

1 Like

Hi Lida.
when I use Persian Calendar I have some problem
for Ex: the name of the month is not Iranian name(“Hamal” ) it must be (farvardin).
and other important problem is :
when I want to report from Tracker Program or Pivot table
period is not work correctly like below

I choosed Last 3 months Period and I am in forth month (Saratān1399)
but it does not show correctly month in report.
or when i choose this year in period , it must show 1399
but it shows me like below

is there any way that I should know?