Logo Lanfrica

beabzk/ethioqen

Type de record:

software
Créateur:
bea
Hôte:
A package for Ethiopian date and time conversions # ethioqen: Ethiopian Calendar, Time, and Unix Timestamp Conversion > ⚠️ **Warning**: This library is in very early stages of development and should not be used in production. Contributions are crucial to make this production-ready. `ethioqen` is a Python library that provides accurate and efficient conversions between the Ethiopian calendar, the Gregorian calendar, Ethiopian local time (12-hour format), standard 24-hour local time, and Unix timestamps. ## Introduction The Ethiopian calendar is a solar calendar used in Ethiopia and Eritrea. It differs significantly from the Gregorian calendar, which is the most widely used calendar system today. **Key Differences:** * **Year Offset:** The Ethiopian calendar is typically 7-8 years behind the Gregorian calendar. * **Months:** It has 13 months: 12 months of 30 days each and a 13th month called *Pagume*, which has 5 days (6 days in a leap year). * **New Year:** The Ethiopian New Year (*Enkutatash*) falls on September 11th (or 12th in a Gregorian leap year). * **Leap Years:** Ethiopia follows a simple 4-year leap year cycle without the century exception found in the Gregorian calendar. **Ethiopian Local Time:** Ethiopian time uses a 12-hour clock that starts counting from dawn (around 6:00 AM standard time). This creates a 6-hour offset between Ethiopian and standard time: * 12:00 AM Ethiopian = 6:00 AM standard time * 1:00 AM Ethiopian = 7:00 AM standard time * 12:00 PM Ethiopian = 6:00 PM standard time * 6:00 PM Ethiopian = 12:00 AM standard time (next day) ## Installation ```bash pip install ethioqen ``` ## Usage Examples ### Calendar Conversions ```python from ethioqen.calendar_conversion import convert_ethiopian_to_gregorian, convert_gregorian_to_ethiopian # Convert from Ethiopian to Gregorian greg_year, greg_month, greg_day = convert_ethiopian_to_gregorian(2016, 7, 6) print(f"{greg_year}-{greg_month}-{greg_day}") # Output: 2024-3-15 # Convert from Gregorian to Ethiopian eth_year, eth_month, eth …

Languages

Licenses