A python CLI calendar program built for class project
# 🗓️ Ethiopian-Aware Calendar
A command-line calendar that prints a standard Gregorian (or Julian) year,
with the corresponding **Ethiopian calendar date** shown alongside every
day — including the correct Ethiopian month spans and the 13th month,
Pagume.
```
Gregorian Year: 2024 Ethiopian Years: 2016 - 2017
January Tahsas-Tir
|--------------------------------------------------|
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|--------------------------------------------------|
| | 1 | 2 | 3 | 4 | 5 | 6 |
| | 22 | 23 | 24 | 25 | 26 | 27 |
|--------------------------------------------------|
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 28 | 29 | 30 | 1 | 2 | 3 | 4 |
```
*(top line: Gregorian date, bottom line: Ethiopian date)*
## Why
The Ethiopian calendar runs roughly 7–8 years behind the Gregorian
calendar and has 13 months (12 of 30 days, plus a short 5- or 6-day
month, Pagume). This tool lets you look up the Ethiopian date for any
day in a Gregorian or Julian year, month-by-month, from the command line.
## How it works
Dates are converted through a **Julian Day Number (JDN)** — a single
running count of days used as a common intermediate format between
calendar systems. The flow is:
```
Gregorian/Julian date → JDN → Ethiopian date
```
The Gregorian/Julian → JDN formulas are standard astronomical
conversions. The JDN → Ethiopian conversion uses a fixed epoch offset
(1723856) and a 4-year/1461-day cycle to account for the Ethiopian leap
year pattern.
**Correctness is checked against known reference dates** in the test
suite — specifically, Ethiopian New Year (1 Meskerem) is documented to
fall on September 11 in the Gregorian calendar, or September 12 in the
year immediately before a Gregorian leap year. All four spot-checked
years match.
## Usage
**Non-interactive (recommended for scripting/quick lookups):**
```bash
python ethiopian_calendar.py 2024
python ethiopian_calendar.py 1750 --calendar J
python ethiopian_calendar.py 1750 -c J
` …