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.