Aller au contenu
GET /v1/convert

Convert Gregorian ⇄ Hijri date

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/prayer-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/prayer-api/v1/convert" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/prayer-api/v1/convert", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/prayer-api/v1/convert");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/prayer-api/v1/convert",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "conversion": {
            "from": "gregorian",
            "hijri": {
                "day": "15",
                "date": "15-12-1447",
                "year": "1447",
                "month": "Dhū al-Ḥijjah",
                "weekday": "Al Athnayn",
                "month_ar": "ذوالحجة",
                "designation": "AH",
                "month_number": 12
            },
            "input": "01-06-2026",
            "gregorian": {
                "day": "01",
                "date": "01-06-2026",
                "year": "2026",
                "month": "June",
                "weekday": "Monday",
                "month_number": 6
            }
        }
    },
    "meta": {
        "timestamp": "2026-05-31T15:30:51.136Z",
        "request_id": "fdc25ac3-a7a6-4742-ae29-7139b751f775"
    },
    "status": "ok",
    "message": "Date converted",
    "success": true
}