*! eth_to_eth2grecal 1.0

help eth2grecal

Title

eth2grecal -- Convert Ethiopian calendar dates to Gregorian calendar dates

Syntax

eth2grecal
[,
options]

Main
et_year(varname) specifies Ethiopian calendar year varname

et_month(varname) specifies Ethiopian calendar month varname

et_day(varname) specifies Ethiopian calendar day varname

Description

eth2grecal converts dates from the Ethiopian calendar to the Gregorian calendar. It
creates new variables for the Gregorian year, month, and day based on the provided
Ethiopian date variables. The conversion is accurate for Ethiopian calendar dates within
the Gregorian year range of 1901-2099.

Options

Main

et_year(varname) specifies the variable containing the Ethiopian calendar year.

et_month(varname) specifies the variable containing the Ethiopian calendar month.

et_day(varname) specifies the variable containing the Ethiopian calendar day.

Background: The Ethiopian calendar

The Ethiopian calendar, also known as the Ge'ez calendar, is closely related to the Coptic
and Julian calendars but has its own unique features. It comprises 13 months: 12 months
each consisting of 30 days, and an additional month, Pagume, with 5 days (6 days in leap years).
Similar to the Julian calendar, the Ethiopian calendar has a leap year every four years without
exception, contrasting with the Gregorian calendar's more complex leap year system. The Ethiopian
New Year typically falls on September 11th in the Gregorian calendar, or September 12th in
Gregorian leap years. Depending on the time of year, the Ethiopian calendar is seven or
eight years behind the Gregorian calendar.

Remarks

The command checks for the existence of g_year, g_month, and g_day variables in the dataset before running.
If these variables already exist, the command will not proceed to prevent overwriting existing data.

The conversion is accurate for Ethiopian calendar dates within the Gregorian year range of 1901-2099.
This is because the Ethiopian and Gregorian calendars differ in their leap year calculations
when it comes to centurial years: 1900 and 2100 are leap years
in the Ethiopian calendar but not in the Gregorian calendar, leading to potential offsets in date
conversions outside this range.

The command does not convert the date if:

a) the Ethiopian calendar date is outside of the Gregorian year range of 1901-2099;
b) the Ethiopian calendar month is not within the range of 1-13;
c) the Ethiopian calendar day is not within the range of 1-30 for the 1st-12th months, or not within the range of 1-6 for the 13th month.

Example

Suppose you have a dataset with Ethiopian calendar date variables named e_year, e_month, and e_day. To convert these dates to the Gregorian calendar, you would use the following command:

. eth2grecal, et_year(e_year) et_month(e_month) et_day(e_day)

This command will create three new variables in your dataset: g_year, g_month, and g_day, which represent the Gregorian year, month, and day, respectively.

Author

Kalle Hirvonen, International Food Policy Research Institute (IFPRI), k.hirvonen@cgiar.org

Last updated

4 January 2024 (25 Tahsas 2016 in Ethiopian calendar)