Download Ethiopian Calendar Converter

0 views
Skip to first unread message

Senaida Flinspach

unread,
Jan 7, 2024, 9:47:38 PM1/7/24
to tranturgangfarb

Hi Devs,
I have a question regarding non-Gregorian (Western) calendar systems. This issue has come up in a couple of different places which I know of, namely Ethiopia (Ethiopian calendar) and Afghanistan (Solar Hijri calendar). Currently, the system only supports a Gregorian calendar system, but I am trying to think of ways how we can support different ones, specifically the Bikram Sambat (BS) calendar system used in Nepal.

There appears to be no easy way to convert between a Gregorian calendar. I dug out some code here which will convert between Gregorian dates and BS dates (but not the other way around). The approach is to use a look-up table, because of the fact that it seems to be difficult (if not impossible) to calculate the conversion algorithmically.

download ethiopian calendar converter


DOWNLOAD https://8itmenzhora.blogspot.com/?dtts=2x4Wjo



The second part of this (which I think may be more difficult) is the use of the JavaScript Gregorian calendar throughout the system. For data entry of aggregate data, it would not to be too problematic. But for the tracker module (and other places in the system), a Gregorian Javascript widget is used, and it would seem to be potentially difficult to replace this.

Secondly, is conversion between Gregorian dates and some other calendar really required. If data is exchanged between different systems with different calendars, this is important. But if we are storing a timestamp in database, it should be fine to store it in the locale calendar. So I am not too keen, unless really required to use the maps that allow co-relating dates between calendar systems.

Thirdly, there are quite a few (and fairly easy to write new JavaScript calendars) to suite different locales. The care that we need to take is being able to retrieve the correct calendar based on the set locale. A simple BS calendar JS - -works/nepali-datepicker-ui/

I feel the best approach would be to store all of the data with Gregorian dates, but what is shown through the web UI would be the calendar system of the particular instance. I am not even sure if databases like Postgres and MySQL (much less the operating system itself) would support non Gregorian calendar systems.

Thanks for the link to the BS date picker. Does not seem to difficult to solve at least this problem.The bigger issue as I see it would be data entry through mobiles. At least the J2ME app uses the system calendar, and do not think that non-Gregorian systems are even supported on any phone?

I think we should be Calendar agnostic in code and like most i18n capable systems, not expect the timestamp in the database to be Calendar-specific
Postgres for instance uses Julian calendar internally. But still supports many different systems, much more than standard SQL asks for.

My point is, Java, Postgres (and MySQL) are well designed to work by being calendar-agnostic.
Also, Joda-time provides nice Chronology classes for different calendars, which we can use for localized storing, retrieving or converting

For the JavaME app in one of the releases, we did have a custom calendar component.
Having it display BS, Ethiopian or anything else, should be fairly easy. But yes, very few low-end Java phones are locale specific.

I think we should be Calendar agnostic in code and like most i18n capable
systems, not expect the timestamp in the database to be Calendar-specific
Postgres for instance uses Julian calendar internally. But still supports
many different systems, much more than standard SQL asks for.
Java similar uses long values, instead of Calendar-specific
representations.

For the JavaME app in one of the releases, we did have a custom calendar
component.
Having it display BS, Ethiopian or anything else, should be fairly easy.
But yes, very few low-end Java phones are locale specific.

Hi Saptarshi,
Yes, I cannot speculate really why DHIS2 only supports the Gregorian
calendar, but this issue I think has been discussed a few times on the list
before (perhaps for other countries).

I feel the best approach would be to store all of the data with Gregorian
dates, but what is shown through the web UI would be the calendar system of
the particular instance. I am not even sure if databases like Postgres and
MySQL (much less the operating system itself) would support non Gregorian
calendar systems.

Thanks for the link to the BS date picker. Does not seem to difficult to
solve at least this problem.The bigger issue as I see it would be data
entry through mobiles. At least the J2ME app uses the system calendar, and
do not think that non-Gregorian systems are even supported on any phone?

When you say the system currently only support Gregorian calendar, I
wonder if that's a fact of JavaScript widgets
But while I was writing this email, a quick search in the code base
shows that we've instantiated Gregorian calendar at many places instead of
using the more localized Calendar.getInstance(). The first task would be
move to using this

Secondly, is conversion between Gregorian dates and some other calendar
really required. If data is exchanged between different systems with
different calendars, this is important. But if we are storing a timestamp
in database, it should be fine to store it in the locale calendar. So I am
not too keen, unless really required to use the maps that allow co-relating
dates between calendar systems.

35fe9a5643
Reply all
Reply to author
Forward
0 new messages