Utilities

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.

Endpoint:/api/v1/hijri/convert
Method:GET
Latency:~5ms

Try it out

GET/api/v1/hijri/convert

Parameters

Code

curl
curl -X GET "https://khaleejiapi.dev/api/v1/hijri/convert?today=true" \
-H "Authorization: Bearer your_api_key"

Parameters

NameTypeRequiredDescription
datestringOptionalGregorian date (YYYY-MM-DD) to convert to Hijri
hijristringOptionalHijri date (YYYY-MM-DD) to convert to Gregorian
todaybooleanOptionalConvert 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

#EnglishArabic
1Muharramمحرم
2Safarصفر
3Rabi al-Awwalربيع الأول
4Rabi al-Thaniربيع الثاني
5Jumada al-Ulaجمادى الأولى
6Jumada al-Thaniجمادى الثانية
7Rajabرجب
8Sha'banشعبان
9Ramadanرمضان
10Shawwalشوال
11Dhu al-Qi'dahذو القعدة
12Dhu 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

PlanRequests/MonthRate Limit
Free1,00020 req/min
Starter10,00060 req/min
Professional100,000300 req/min
Business500,000500 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.