Day status
Today (or any date) as machine-readable flags — Hijri date, the day's events, and mourning/festive season, fasting and night-of-worship indicators — so masjid sites and apps can theme themselves automatically.
GET https://theshia.org/api/v1/day-status
Parameters
-
datedefault: today the day to describe, YYYY-MM-DD (years 1900 to 2100). -
calendardefault: moonsighting values: "moonsighting" · "iran".
- Response: date, weekday, hijri { hy, hm, hd, monthName ×4 }, the day's events, and flags: mourning (the extended period 1 Muharram → 8 Rabi al-Awwal plus the Fatimiyya days), season { id, kind } (most specific of 14 liturgical seasons), eid, fastingRecommended, fastingForbidden, ashuraImsak, nightOfWorshipEve.
- nightOfWorshipEve is evening-anchored (the site's night convention): true on the civil day whose EVENING begins a night of worship — Ramadan 18/20/22 for the Nights of Qadr, 14 Sha'ban for its night.
- One if-statement themes a masjid site: mourning → drape, eid → festive.
Code samples
curl
curl "https://theshia.org/api/v1/day-status" JavaScript
const res = await fetch("https://theshia.org/api/v1/day-status");
const data = await res.json(); Python
import requests
data = requests.get("https://theshia.org/api/v1/day-status").json() Rate limits & fair use
Responses are cached hard at the edge — please cache on your side too. Uncached requests are limited to 100 per minute per IP; oversized requests (over 496 day×method computations) are rejected. Free for community use, no uptime guarantee.