A complete Ekadashi calculation system consisting of:
- 🌐 Public Ekadashi API
- 📅 Interactive Web Calendar
- 🤖 Telegram Reminder Bot
- 🔭 Astronomically accurate calculations
This project calculates Ekadashi dates using astronomical moon–sun positions, rather than relying on static tables.
https://hariprajwal.github.io/Ekadashi-reminder/
Interactive interface to:
- Check if today is Ekadashi
- Find next Ekadashi
- View Ekadashi calendar for any year
- Check specific dates
Base API endpoint:
https://ekadashi-api.onrender.com/
This API can be integrated into:
- Mobile apps
- Telegram bots
- Calendar apps
- Websites
- Spiritual reminder systems
The system calculates Ekadashi using:
- Sun–Moon angular distance
- Tithi calculations
- Arunodaya rule (96 minutes before sunrise)
- Vaishnava / ISKCON fasting rules
Each Ekadashi is classified as:
- 🌕 Shukla Paksha (Waxing Moon)
- 🌑 Krishna Paksha (Waning Moon)
The bot automatically sends reminders:
- 🌙 1 day before Ekadashi
- 🌅 6 AM on Ekadashi day
Users can also query:
/today
/tomorrow
/next
/year 2026
/check 2026-03-15
The website allows users to:
✔ Check today's Ekadashi ✔ Check tomorrow's Ekadashi ✔ Find next Ekadashi ✔ View full yearly calendar ✔ Verify any specific date
Ekadashi is determined by tithi (lunar day).
A tithi is calculated using:
Tithi = (Moon Longitude − Sun Longitude) / 12°
Each tithi spans 12 degrees of separation between the Moon and Sun.
Ekadashi corresponds to:
11th Tithi
1️⃣ Calculate Julian day
2️⃣ Get Sun longitude
3️⃣ Get Moon longitude
4️⃣ Compute angular difference
elongation = (moon_longitude - sun_longitude) % 360
5️⃣ Determine tithi
tithi = int(elongation / 12) + 1
Vaishnava Ekadashi fasting follows an additional rule:
Ekadashi must be present at:
Arunodaya = Sunrise - 96 minutes
If Dashami overlaps Arunodaya, the fasting day shifts.
This rule ensures the correct observance day.
https://ekadashi-api.onrender.com
/today
Example response:
{
"date": "2026-03-15",
"is_ekadashi": true
}/tomorrow
/next
Example response:
{
"date": "2026-03-29",
"paksha": "Shukla",
"days_until": 14
}/year/{year}
Example:
/year/2028
Response:
{
"year": 2028,
"total": 25,
"dates": [
{"date":"2028-01-08","paksha":"Shukla"},
{"date":"2028-01-22","paksha":"Krishna"}
]
}/check/YYYY-MM-DD
Example:
/check/2026-03-15
┌─────────────────────────┐
│ GitHub Pages │
│ Ekadashi Website │
└──────────┬──────────────┘
│
▼
┌─────────────────────────┐
│ Render API │
│ FastAPI Server │
└──────────┬──────────────┘
│
▼
┌─────────────────────────┐
│ Ekadashi Calculator │
│ Swiss Ephemeris Logic │
└─────────────────────────┘
- Python
- FastAPI
- Swiss Ephemeris
- pytz
- HTML
- CSS
- JavaScript
- GitHub Pages
- Render (API hosting)
- GitHub Pages (website hosting)
- Telegram Bot API
Hosted on:
Render
Start command:
uvicorn main:app --host 0.0.0.0 --port $PORT
Hosted using:
GitHub Pages
(Add images here)
Example:
/images/website.png
/images/calendar.png
/images/api.png
Example JavaScript request:
fetch("https://ekadashi-api.onrender.com/next")
.then(res => res.json())
.then(data => console.log(data))Next Ekadashi:
Date: 29 March 2026
Paksha: Shukla
Days remaining: 14
Many Ekadashi calendars online:
- rely on static tables
- do not expose developer APIs
- cannot be integrated with applications
This project provides:
✔ Dynamic calculations ✔ Open API ✔ Developer integration ✔ Reminder automation
Pull requests and improvements are welcome.
Possible future improvements:
- Panchang API
- Moon phase display
- Festival calendar
- Mobile app
MIT License
Inspired by traditional Vaishnava Panchang calculations and astronomical ephemeris data.
May this project help devotees observe Ekadashi with devotion and awareness.