Ethiopian Calendar (ethiopian-calendar)
A lightweight, standards-compliant Python library for converting between the Ethiopian calendar (Ge'ez calendar) and the Gregorian calendar system.
Features
- Bidirectional Conversion: Seamless conversion between
EthiopicDateand standard Pythondatetime.date. - Leap Year Handling: Accurate calculation of 4-year leap cycles, including 6-day Pagume months.
- Multilingual Support: Access month names in both Amharic script (e.g., መስከረም) and Latin transliteration (e.g., Meskerem).
- Zero External Dependencies: Built entirely with Python standard library components.
- Modern Packaging: Structured using the recommended
src/layout with unit test coverage.
Installation
Clone the repository and install in editable mode:
git clone [https://github.com/shehisomolalign/ethiopian-calendar.git](https://github.com/shehisomolalign/ethiopian-calendar.git)
cd ethiopian-calendar
pip install -e .
## Quick Start
```python
from datetime import date
from ethiopian_calendar import EthiopicDate
# Create an Ethiopian date
eth_date = EthiopicDate(year=2015, month=1, day=1)
print(eth_date) # Output: 1 Meskerem 2015
print(eth_date.month_name(lang="amharic")) # Output: መስከረም
# Convert Ethiopian date to Gregorian date
greg_date = eth_date.to_gregorian()
print(greg_date) # Output: 2022-09-11
# Convert Gregorian date to Ethiopian date
converted_eth = EthiopicDate.from_gregorian(date(2022, 9, 11))
print(converted_eth) # Output: 1 Meskerem 2015
# Check if a year is a leap year
print(eth_date.is_leap_year) # Output: True
Release files for ethiopian-calendar 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ethiopian_calendar-0.1.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ethiopian_calendar-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / ethiopian_calendar-0.1.0.tar.gz
| Download URL | ethiopian_calendar-0.1.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47e5dd8478fca609b2ed1506c669c71c405338ec3292c02e913092cd88b1e072
|
|
BLAKE2b-256 checksum How to use checksums |
23276fec3f3cffdcc3ee467bdc573c34a928c99e6d7d5f4655bb3291841e127a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / ethiopian_calendar-0.1.0-py3-none-any.whl
| Download URL | ethiopian_calendar-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80dcb766eb6413c4087257b0b6afa56bc6f850722708df8ab80c86ca58f1da06
|
|
BLAKE2b-256 checksum How to use checksums |
03627cabeffba011cfdd9c5b9973301fae0d0dfba76e97acbb0369892301d4b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|