The ethiodate package offers a fast, reliable, and user-friendly solution for converting dates between the Gregorian and Ethiopian calendar systems directly within Stata. Built in Mata for maximum computational efficiency, it provides super-fast date conversions.
You can install or update the latest version of ethiodate directly from GitHub using:
net install ethiodate, from("https://raw.githubusercontent.com/GutUrago/stata-ethiodate/main/") replaceThis will download and install all necessary files.
Converts Ethiopian calendar date variables (year, month, day) to a single Gregorian Stata date.
to_gregorian eth_year eth_month eth_day, gre_date(newvar)eth_year,eth_month, andeth_day: numeric variables with Ethiopian date components.gre_date(): name of the new Gregorian Stata date variable to create.
Example:
to_gregorian eth_yr eth_mo eth_dy, gre_date(greg_date)Converts Gregorian calendar date variable to Ethiopian date components: year, month, day.
to_ethiopian gre_date, eth_year(newvar) eth_month(newvar) eth_day(newvar)eth_year,eth_month, andeth_day: new numeric variables name of Ethiopian date components.gre_date(): name of the Gregorian Stata date variable to convert.
Example:
to_gregorian eth_yr eth_mo eth_dy, gre_date(greg_date)
to_ethiopian greg_dateTo get detailed documentation in Stata, type:
help ethiodate
help to_gregorian
help to_ethiopian- Fully vectorized, efficient and precise date conversion
- Supports use within data cleaning and transformation pipelines
- Compatible with Stata 10.0 and later
- Clear help files and user instructions
Gutama Girja Urago
Research Analyst at Laterite Consulting PLC
Contributions, feedback, and issue reports are welcome! Please open a pull request or submit an issue via the GitHub repository.