Hijri Calendar Converter
Bidirectional conversion between Gregorian and Hijri (Islamic) calendars using the Tabular Islamic Calendar algorithm via Julian Day Number. Returns full date details in both English and Arabic, including month names, day-of-week, and formatted dates.
/api/v1/hijri/convertTry it out
/api/v1/hijri/convertParameters
Code
curl -X GET "https://khaleejiapi.dev/api/v1/hijri/convert?today=true" \ -H "Authorization: Bearer your_api_key"Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| date | string | Optional | Gregorian date (YYYY-MM-DD) to convert to Hijri |
| hijri | string | Optional | Hijri date (YYYY-MM-DD) to convert to Gregorian |
| today | boolean | Optional | Convert today's date (default if no params) |
Note: Provide date for Gregorian → Hijri, hijri for Hijri → Gregorian, or no params to convert today's date.
Hijri Month Names
| # | English | Arabic |
|---|---|---|
| 1 | Muharram | محرم |
| 2 | Safar | صفر |
| 3 | Rabi al-Awwal | ربيع الأول |
| 4 | Rabi al-Thani | ربيع الثاني |
| 5 | Jumada al-Ula | جمادى الأولى |
| 6 | Jumada al-Thani | جمادى الثانية |
| 7 | Rajab | رجب |
| 8 | Sha'ban | شعبان |
| 9 | Ramadan | رمضان |
| 10 | Shawwal | شوال |
| 11 | Dhu al-Qi'dah | ذو القعدة |
| 12 | Dhu al-Hijjah | ذو الحجة |
Response Fields
gregorian
Full Gregorian date details: date, year, month, day, dayOfWeek (en/ar), monthName (en/ar)
hijri
Full Hijri date details: date, year, month, day, dayOfWeek (ar), monthName (en/ar)
direction
'gregorian-to-hijri' or 'hijri-to-gregorian' — indicates which conversion was performed
Rate Limits
| Plan | Requests/Month | Rate Limit |
|---|---|---|
| Free | 1,000 | 20 req/min |
| Starter | 10,000 | 60 req/min |
| Professional | 100,000 | 300 req/min |
| Business | 500,000 | 500 req/min |
Debugging & Support
Include X-Request-ID when contacting support
Every response from KhaleejiAPI includes an X-Request-ID header — a unique identifier that lets our support team pull the exact log entry for your request within seconds. Always share it when reporting an unexpected error or unexpected result.
How to capture it
JavaScript / fetch
const res = await fetch("https://khaleejiapi.dev/api/v1/...", {
headers: { Authorization: "******" },
});
const requestId = res.headers.get("x-request-id");
console.log("Request ID:", requestId);
// → e.g. "req_01j9xkz4vp8..."cURL
curl -si "https://khaleejiapi.dev/api/v1/..." \ -H "Authorization: ******" | grep -i x-request-id # → x-request-id: req_01j9xkz4vp8...
Browser DevTools
Open DevTools (F12) → Network tab → click the failing request → scroll to the Response Headers section → copy the value next to x-request-id.
For a full list of error codes and guidance on common issues, see the Troubleshooting guide.