ہجری تاریخ کی تبدیلی
ہجری اور عیسوی کیلنڈر کے درمیان دونوں سمتوں میں تاریخ کی تبدیلی — ہر درخواست میں ایک دن، پورا مہینہ یا پورا سال، عالمی رؤیتِ ہلال یا ایران کے سرکاری کیلنڈر کے مطابق۔ اعلان شدہ مہینوں کا جواب مستند جدولوں سے دیا جاتا ہے، اس سے آگے چاند کی حقیقی رؤیت کا فلکیاتی حساب لگایا جاتا ہے، اور ہر جواب اپنا ماخذ بتاتا ہے۔
GET https://theshia.org/api/v1/hijri
پیرامیٹرز
-
datedefault: today Gregorian day to convert, YYYY-MM-DD (years 1900 to 2100). -
yearoptional with month: that Gregorian month as a day-by-day map; alone: the full year (366-day budget). -
monthoptional 1 to 12, combined with year. -
hyreverse Hijri year, 1317 to 1523 (≈ Gregorian 1900–2100) — switches the direction to Hijri → Gregorian. -
hmreverse Hijri month, 1 (Muharram) to 12 (Dhul Hijjah). -
hdreverse Hijri day, 1 to that month's real length (checked); omit it for the whole month as a day-by-day map. -
calendardefault: moonsighting values: "moonsighting" (global crescent sighting) · "iran" (official reckoning; outside its table — after 19 March 2028 — it answers as moonsighting and says so in calendarUsed). -
offsetdefault: 0 -2 to 2 whole days — the conventional local-sighting adjustment, applied before Gregorian → Hijri conversion only.
- Answer layers, reported in source: "table" (an announced sighting, or Iran's official reckoning) → "computed" (crescent-visibility calculation: Meeus new moon + Yallop/Shaukat criterion, Tehran reference — the same engine as AL-Qamar; covers all future and historic dates) → "tabular" (arithmetic estimate, last resort).
- Response: gregorian, weekday, hijri { year, month, day }, monthName { en, ar, fa, ur }, formatted { en, ar, fa, ur } with localized digits, monthLength, calendarUsed, source. Whole-month Hijri queries return gregorianStart, gregorianEnd and a days map instead.
- Identical to the Hijri date shown on this site — both run the same library.
کوڈ کے نمونے
curl
curl "https://theshia.org/api/v1/hijri?hy=1448&hm=1" JavaScript
const res = await fetch("https://theshia.org/api/v1/hijri?hy=1448&hm=1");
const data = await res.json(); Python
import requests
data = requests.get("https://theshia.org/api/v1/hijri?hy=1448&hm=1").json() حدود اور منصفانہ استعمال
جوابات ایج پر سختی سے کیش ہوتے ہیں — براہِ کرم اپنی طرف بھی کیش کریں۔ غیر کیش درخواستیں فی IP 100 فی منٹ تک محدود ہیں؛ 496 دن×طریقہ سے بڑی درخواستیں مسترد ہوتی ہیں۔ کمیونٹی کے لیے مفت، دستیابی کی ضمانت نہیں۔