كل مثال مخرجات حقيقية التُقطت بتاريخ 2026-12-01 من تشغيل محلي للكود نفسه. القيم الحيّة تختلف.
الأساسيات
العنوان الأساسي: https://clockcrest.com
- كل نقطة وصول هي طلب GET يعيد JSON بترميز UTF-8. الطلب HEAD يُجاب مثل GET، والطلب OPTIONS يجيب الطلب التمهيدي في CORS، وأي طريقة أخرى تُقابَل بالرمز 405.
- لا مفتاح ولا حساب ولا ملفات تعريف ارتباط، ولا يُحفظ أي شيء مما ترسله.
- المناطق الزمنية بأسماء IANA (مثل Europe/Paris)، والدول برمز ISO 3166-1 من حرفين (مثل FR)، والتواريخ بصيغة YYYY-MM-DD، واللحظات الزمنية بتوقيت UTC وفق ISO 8601.
- يرد كل معامل مرة واحدة فقط، وسلسلة الاستعلام كلها محدودة بـ512 حرفاً. المعاملات التي لا تعرّفها نقطة الوصول تتجاهلها واجهة REST، إلا في
/api/v1/status التي ترفضها. - كل رد يذكر مصدره في الحقل source، ويحمل عند الحاجة الحقول sourceUrl و dataYears و lastUpdated وقائمة notes بالتنبيهات.
الأخطاء
الخطأ رمز حالة HTTP من فئة 4xx أو 5xx مع شكل JSON واحد. قيمة code ثابتة وموجّهة للبرامج، وقيمة message بالإنجليزية وموجّهة للقارئ ولا تكرّر أبداً القيمة المرفوضة. تُرسَل ردود الأخطاء مع Cache-Control: no-store.
{
"error": {
"code": "invalid_timezone",
"message": "Unknown time zone in \"tz\". Use an IANA name such as Europe/Paris."
}
}طلب بطريقة خاطئة، مثلاً:
curl -X POST 'https://clockcrest.com/api/v1/time/now?tz=UTC'
{"error":{"code":"method_not_allowed","message":"Only GET is supported."}}التخزين المؤقت
تحمل الردود الناجحة ترويسة Cache-Control تُختار لكل نقطة وصول، من ثانية واحدة للوقت الحالي إلى يوم كامل للبيانات التي لا تتغيّر إلا عند إعادة بناء الموقع. القيمة التي ترسلها كل نقطة وصول مذكورة في خانتها أدناه، كما هي معرَّفة في الكود وكما التُقطت من رد حقيقي. التزم بها من فضلك، فهي أهم ما يُبقي الخدمة مجانية.
CORS
يمكن استدعاء الواجهة من المتصفح في أي موقع. وهذه هي الترويسات المرسَلة:
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization, X-API-Key
Access-Control-Max-Age: 86400
الأولى ترد في كل رد، حتى ردود الأخطاء، والبقية تجيب طلب OPTIONS التمهيدي. لا بيانات اعتماد في الأمر، فلا شيء يحتاج إلى سماح.
الإصدارات والتوافق
- إصدار الواجهة هو 1.1.0 (الحقل info.version في ملف OpenAPI). يرتفع عند إضافة عمليات أو معاملات أو حقول في الردود.
- المسارات تحت
/api/v1/ باقية: التغييرات بالإضافة فقط، فاكتب عملاء يتجاهلون الحقول التي لا يعرفونها. - عند نقل نقطة وصول بقي مسارها الأصلي ويعيد الرد نفسه:
/api/v1/time → /api/v1/time/now, /api/v1/convert → /api/v1/time/convert. - أدوات MCP التي تغيّرت أسماؤها ما زالت تستجيب لأسمائها السابقة:
convert_time → convert_timezone, get_public_holidays → get_country_holidays, count_business_days → calculate_business_days.
المناطق الزمنية والتوقيت الصيفي
فوارق التوقيت وقواعد التوقيت الصيفي مصدرها قاعدة بيانات IANA المضمَّنة في نظام التشغيل الذي يخدّم الواجهة. يُقبل اسم المنطقة بأي حالة أحرف، ويُعاد باسمه الحالي في IANA.
الوقت المحلي لا يحمل فارقاً عن UTC، ولذلك قد يكون حول موعد تغيير الساعة ملتبساً أو غير موجود أصلاً. نقطة التحويل لا تحسم ذلك بصمت أبداً: الحقل resolution يذكر ما جرى والحقل note يشرحه.
وقت غير موجود
عند الساعة 02:00 يوم 14 مارس 2027 تُقدَّم الساعة في نيويورك إلى 03:00، فلا وجود للوقت 02:30. يُطبَّق الفارق الساري قبل التقديم فتقع النتيجة بعده (gap_shifted_forward):
curl 'https://clockcrest.com/api/v1/convert?from=America/New_York&to=UTC&time=2027-03-14T02:30'
مثال على الرد
{
"input": {
"from": "America/New_York",
"to": "UTC",
"time": "2027-03-14T02:30:00"
},
"from": {
"timeZone": "America/New_York",
"local": "2027-03-14T03:30:00",
"iso": "2027-03-14T03:30:00-04:00",
"utcOffset": "-04:00",
"utcOffsetMinutes": -240,
"abbreviation": "EDT",
"isDst": true
},
"to": {
"timeZone": "UTC",
"local": "2027-03-14T07:30:00",
"iso": "2027-03-14T07:30:00+00:00",
"utcOffset": "+00:00",
"utcOffsetMinutes": 0,
"abbreviation": "UTC",
"isDst": false
},
"utc": "2027-03-14T07:30:00Z",
"resolution": "gap_shifted_forward",
"note": "The source time does not exist: clocks in the source zone jumped forward over it. The offset in force before the jump was applied, so the time was read as the equivalent moment after the jump.",
"source": "IANA tz database (runtime Intl)"
}وقت يتكرّر مرتين
عند الساعة 02:00 يوم 1 نوفمبر 2026 تُؤخَّر الساعة في نيويورك إلى 01:00، فيتكرّر الوقت 01:30 مرتين. يُؤخذ الحدوث الأول ويُسرد الحدوثان في الحقل occurrences (القيمة overlap_earlier):
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=UTC&time=2026-11-01T01:30'
مثال على الرد
{
"input": {
"from": "America/New_York",
"to": "UTC",
"time": "2026-11-01T01:30:00"
},
"from": {
"timeZone": "America/New_York",
"local": "2026-11-01T01:30:00",
"iso": "2026-11-01T01:30:00-04:00",
"utcOffset": "-04:00",
"utcOffsetMinutes": -240,
"abbreviation": "EDT",
"isDst": true
},
"to": {
"timeZone": "UTC",
"local": "2026-11-01T05:30:00",
"iso": "2026-11-01T05:30:00+00:00",
"utcOffset": "+00:00",
"utcOffsetMinutes": 0,
"abbreviation": "UTC",
"isDst": false
},
"utc": "2026-11-01T05:30:00Z",
"resolution": "overlap_earlier",
"note": "The source time occurs twice because clocks in the source zone were set back. The earlier occurrence was used; pass overlap=later for the second one.",
"occurrences": ["2026-11-01T01:30:00-04:00", "2026-11-01T01:30:00-05:00"],
"source": "IANA tz database (runtime Intl)"
}أرسل overlap=later للحدوث الثاني (overlap_later):
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=UTC&time=2026-11-01T01:30&overlap=later'
تواريخ مجموعات البيانات
تاريخ آخر توليد أو مراجعة لكل مجموعة بيانات. التواريخ نفسها تعود في الحقل lastUpdated في الردود التي تعتمد عليها.
| مجموعة البيانات | آخر تحديث |
|---|
| العطل الرسمية (Nager.Date) | 2026-11-30 |
|---|
| المدن والدول (GeoNames، بترخيص CC BY 4.0) | 2026-11-30 |
|---|
| ساعات البورصات (صفحة كل بورصة) | 2026-11-30 |
|---|
| قواعد المناطق الزمنية (قاعدة بيانات IANA) | تتبع نظام التشغيل |
|---|
مصدر كل مجموعة بيانات وما لا تغطيه مذكوران في نظرة المطوّرين العامة. المرجع نفسه بصيغة مقروءة آلياً: /openapi.json
لا توجد نقطة وصول مطابقة. جرّب مساراً أو اسم معامل أو كلمة مثل «عطل».
الوقت
الوقت الحالي، والتحويل بين المناطق، والمناطق الزمنية، وفوارق التوقيت، ومواعيد تغيير التوقيت الصيفي (قاعدة بيانات IANA).
GET /api/v1/time/now
الوقت الحالي في منطقة زمنية. التاريخ والوقت الحاليان في منطقة زمنية من مناطق IANA، مع فارق التوقيت عن UTC، والاختصار، وهل التوقيت الصيفي سارٍ، وموعد التغيّر القادم في الفارق. المسار /api/v1/time هو المسار الأصلي وما زال متاحاً.
المسار الأصلي، وما زال يعمل: /api/v1/time · أداة MCP: get_current_time
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=1 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/now?tz=Europe/Paris'
{
"timeZone": "Europe/Paris",
"local": "2026-12-01T14:46:26",
"iso": "2026-12-01T14:46:26+01:00",
"utcOffset": "+01:00",
"utcOffsetMinutes": 60,
"abbreviation": "CET",
"isDst": false,
"utc": "2026-12-01T13:46:26Z",
"unixMs": 1796132786067,
"nextTransition": {
"at": "2027-03-28T01:00:00Z",
"utcOffsetBefore": "+01:00",
"utcOffsetAfter": "+02:00"
},
"source": "IANA tz database (runtime Intl)"
}حقول الرد (14)
المخطط: #/components/schemas/CurrentTime
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/now?tz=Mars/Olympus'
400 {"error":{"code":"invalid_timezone","message":"Unknown time zone in \"tz\". Use an IANA name such as Europe/Paris."}}جرّبها في ساحة التجربة
GET /api/v1/time/convert
تحويل وقت محلي بين منطقتين. يحوّل وقتاً محلياً من منطقة زمنية إلى أخرى. الوقت الذي تتخطّاه الساعة عند تقديمها، أو يتكرّر عند تأخيرها، يُحسم صراحةً في الحقول resolution و note و occurrences. المسار /api/v1/convert هو المسار الأصلي وما زال متاحاً.
المسار الأصلي، وما زال يعمل: /api/v1/convert · أداة MCP: convert_timezone
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=3600 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=Asia/Tokyo&time=2026-12-25T09:00'
{
"input": {
"from": "America/New_York",
"to": "Asia/Tokyo",
"time": "2026-12-25T09:00:00"
},
"from": {
"timeZone": "America/New_York",
"local": "2026-12-25T09:00:00",
"iso": "2026-12-25T09:00:00-05:00",
"utcOffset": "-05:00",
"utcOffsetMinutes": -300,
"abbreviation": "EST",
"isDst": false
},
"to": {
"timeZone": "Asia/Tokyo",
"local": "2026-12-25T23:00:00",
"iso": "2026-12-25T23:00:00+09:00",
"utcOffset": "+09:00",
"utcOffsetMinutes": 540,
"abbreviation": "GMT+9",
"isDst": false
},
"utc": "2026-12-25T14:00:00Z",
"resolution": "exact",
"note": "The source time exists exactly once in the source zone.",
"source": "IANA tz database (runtime Intl)"
}حقول الرد (25)
المخطط: #/components/schemas/Conversion
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/convert?from=America/New_York&to=Asia/Tokyo&time=tomorrow'
400 {"error":{"code":"invalid_time","message":"Parameter \"time\" must look like 2026-12-25T09:00 (optionally with :SS), without a UTC offset."}}جرّبها في ساحة التجربة
GET /api/v1/time/zones
مناطق IANA الزمنية مع فارقها الحالي. كل منطقة زمنية يعرفها نظام التشغيل الذي يخدّم الواجهة، مع فارقها الحالي عن UTC وهل التوقيت الصيفي سارٍ فيها. مع المعامل country تُعاد مناطق تلك الدولة فقط.
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=300 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/zones?country=AU'
{
"at": "2026-12-01T13:46:26Z",
"country": "AU",
"count": 8,
"timeZones": [
{
"timeZone": "Australia/Adelaide",
"utcOffset": "+10:30",
"utcOffsetMinutes": 630,
"isDst": true,
"countries": ["AU"]
},
// … 7 more
],
"notes": [
"The list is what the serving runtime reports through Intl.supportedValuesOf('timeZone'), plus UTC, and follows the runtime's tz database version. Zones are given under their current IANA name where the site's GeoNames data knows it (Asia/Kolkata, not Asia/Calcutta); a few renamed zones without a sizeable city may still appear under the older name the runtime uses.",
// … 1 more
],
"source": "IANA tz database (runtime Intl)",
"countrySource": "GeoNames",
"countrySourceUrl": "https://www.geonames.org"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (13)
المخطط: #/components/schemas/ZoneList
جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/time/zones?country=Australia'
400 {"error":{"code":"invalid_parameter","message":"Parameter \"country\" is too long (max 2 characters)."}}curl 'https://clockcrest.com/api/v1/time/zones?country=ZZ'
404 {"error":{"code":"country_not_found","message":"No time-zone data for country \"ZZ\"."}}404: The country is not in the data set.
جرّبها في ساحة التجربة
GET /api/v1/time/offsets
المناطق الزمنية مجمّعة بحسب فارقها الحالي. فوارق التوقيت عن UTC المستخدمة في هذه اللحظة، ومع كل فارق المناطق التي تعمل به الآن. مع المعامل minutes يُعاد ذلك الفارق وحده.
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=300 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/offsets?minutes=345'
{
"at": "2026-12-01T13:46:26Z",
"count": 1,
"offsets": [
{
"utcOffset": "+05:45",
"utcOffsetMinutes": 345,
"count": 1,
"timeZones": ["Asia/Kathmandu"]
}
],
"notes": [
"The list is what the serving runtime reports through Intl.supportedValuesOf('timeZone'), plus UTC, and follows the runtime's tz database version. Zones are given under their current IANA name where the site's GeoNames data knows it (Asia/Kolkata, not Asia/Calcutta); a few renamed zones without a sizeable city may still appear under the older name the runtime uses.",
// … 1 more
],
"source": "IANA tz database (runtime Intl)"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (9)
المخطط: #/components/schemas/OffsetList
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/offsets?minutes=9000'
400 {"error":{"code":"out_of_range","message":"Parameter \"minutes\" must be between -720 and 840."}}جرّبها في ساحة التجربة
GET /api/v1/time/dst
تغيّرات فارق التوقيت في منطقة خلال سنة. كل تغيّر في فارق التوقيت عن UTC في منطقة خلال سنة (بدء التوقيت الصيفي وانتهاؤه، أو تغيير دائم)، يُستخرج بالبحث في بيانات tz لدى نظام التشغيل، وبدقة الثانية.
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/dst?tz=America/New_York&year=2027'
{
"timeZone": "America/New_York",
"year": 2027,
"observesDst": true,
"count": 2,
"transitions": [
{
"at": "2027-03-14T07:00:00Z",
"localBefore": "2027-03-14T01:59:59",
"localAfter": "2027-03-14T03:00:00",
"utcOffsetBefore": "-05:00",
"utcOffsetAfter": "-04:00",
"changeMinutes": 60,
"direction": "forward",
"isDstAfter": true
},
// … 1 more
],
"notes": [
"Every change of UTC offset during the UTC calendar year is listed, whatever its cause (daylight saving time or a permanent change of standard time).",
// … 2 more
],
"source": "IANA tz database (runtime Intl)"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (15)
المخطط: #/components/schemas/DstTransitions
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/dst?tz=America/New_York&year=1800'
400 {"error":{"code":"out_of_range","message":"Parameter \"year\" must be between 1970 and 2100."}}جرّبها في ساحة التجربة
GET /api/v1/time/find
إيجاد المنطقة الزمنية لمدينة أو دولة بالاسم. يبحث عن الاسم بين الدول (بالاسم أو برمز ISO) وبين نحو 34,000 مدينة في فهرس GeoNames، ويعيد مناطق IANA المطابقة مع الوقت المحلي الحالي فيها.
أداة MCP: find_timezone
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=60 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/time/find?q=Kathmandu&limit=2'
{
"query": "Kathmandu",
"at": "2026-12-01T13:46:26Z",
"countries": [],
"cities": [
{
"name": "Kathmandu",
"nameAr": "كاتماندو",
"alternateNames": ["كاتماندو", "काठमाडौं", "Katmandou", "Katmandú", "Катманду", "加德滿都"],
"country": "NP",
"countryName": "Nepal",
"timeZone": "Asia/Kathmandu",
"lat": 27.7,
"lon": 85.32,
"population": 1442271,
"slug": "kathmandu",
"url": "https://clockcrest.com/time/kathmandu/",
"utcOffset": "+05:45",
"local": "2026-12-01T19:31:26"
}
],
"notes": [
"A country can span several time zones: each one is listed with its largest cities. City matches are ordered by relevance, then population.",
"The index holds GeoNames populated places of 15,000+ people (about 34,000 cities). Smaller places are not in it.",
// … 1 more
],
"source": "GeoNames",
"sourceUrl": "https://www.geonames.org",
"license": "CC BY 4.0",
"lastUpdated": "2026-11-30",
"timeZoneSource": "IANA tz database (runtime Intl)"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (37)
المخطط: #/components/schemas/TimezoneSearch
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/time/find'
400 {"error":{"code":"missing_parameter","message":"Missing required parameter \"q\"."}}جرّبها في ساحة التجربة
العطل وأيام العمل
العطل الرسمية (Nager.Date، 2025–2028) وحسابات أيام العمل.
GET /api/v1/holidays
العطل الرسمية لدولة في سنة. العطل الرسمية من ملفات Nager.Date الثابتة في الموقع (2025–2028). العطل الإقليمية مشمولة ومعلَّمة برموز أقاليمها.
أداة MCP: get_country_holidays
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/holidays?country=FR&year=2026'
{
"country": "FR",
"countryName": "France",
"year": 2026,
"count": 11,
"holidays": [
{
"date": "2026-01-01",
"name": "New Year's Day",
"localName": "Jour de l'an",
"nationwide": true,
"types": ["Public"]
},
// … 10 more
],
"source": "Nager.Date",
"sourceUrl": "https://date.nager.at",
"dataYears": [2025, 2026, 2027, 2028],
"lastUpdated": "2026-11-30"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (15)
المخطط: #/components/schemas/Holidays
جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/holidays?country=..&year=2026'
400 {"error":{"code":"invalid_country","message":"Parameter \"country\" must be a two-letter ISO 3166-1 code such as FR."}}curl 'https://clockcrest.com/api/v1/holidays?country=FR&year=2031'
404 {"error":{"code":"year_not_found","message":"No data for 2031. Available years for FR: 2025, 2026, 2027, 2028."}}404: No data for that country or year.
جرّبها في ساحة التجربة
GET /api/v1/business-days
عدّ أيام العمل بين تاريخين. أيام العمل بين تاريخين مع احتساب الطرفين، بعد استثناء أيام عطلة نهاية الأسبوع في الدولة والعطل الرسمية العامة على مستوى الدولة. يجب أن يقع النطاق كله ضمن السنوات التي تغطيها بيانات العطل.
أداة MCP: calculate_business_days
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/business-days?country=FR&start=2026-12-01&end=2026-12-31'
{
"country": "FR",
"countryName": "France",
"start": "2026-12-01",
"end": "2026-12-31",
"endInclusive": true,
"calendarDays": 31,
"businessDays": 22,
"weekend": ["Sunday", "Saturday"],
"holidaysExcluded": [
{
"date": "2026-12-25",
"name": "Christmas Day",
"localName": "Noël"
}
],
"holidaysOnWeekend": [],
"rules": "Weekend days and nationwide public holidays are excluded; regional holidays are not.",
"source": "Nager.Date",
"sourceUrl": "https://date.nager.at",
"dataYears": [2025, 2026, 2027, 2028],
"lastUpdated": "2026-11-30"
}حقول الرد (21)
المخطط: #/components/schemas/BusinessDays
جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/business-days?country=FR&start=2026-12-31&end=2026-12-01'
400 {"error":{"code":"invalid_range","message":"Parameter \"end\" must not be before \"start\"."}}curl 'https://clockcrest.com/api/v1/business-days?country=ZZ&start=2026-12-01&end=2026-12-31'
404 {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}404: No holiday data for that country.
جرّبها في ساحة التجربة
GET /api/v1/business-days/add
إضافة أيام عمل أو طرحها. التاريخ الذي تصل إليه بالتقدّم عدداً من أيام العمل (أو بالرجوع، إذا كان العدد سالباً) من تاريخ البداية، مع تخطّي أيام عطلة نهاية الأسبوع والعطل الرسمية العامة في الدولة. تاريخ البداية نفسه لا يُحتسب.
أداة MCP: add_business_days
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/business-days/add?country=EG&start=2026-12-30&days=5'
{
"country": "EG",
"countryName": "Egypt",
"start": "2026-12-30",
"startWeekday": "Wednesday",
"startIsBusinessDay": true,
"days": 5,
"result": "2027-01-06",
"resultWeekday": "Wednesday",
"calendarDays": 7,
"weekend": ["Friday", "Saturday"],
"holidaysSkipped": [],
"rules": "Weekend days and nationwide public holidays are not business days; regional holidays are treated as business days. The start date itself is not counted: the result is the 5 business days after it.",
"notes": ["The weekend used for EG is the one documented for that country."],
"source": "Nager.Date",
"sourceUrl": "https://date.nager.at",
"lastUpdated": "2026-11-30",
"dataYears": [2025, 2026, 2027, 2028]
}حقول الرد (20)
المخطط: #/components/schemas/BusinessDaysAdd
جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/business-days/add?country=FR&start=2028-12-20&days=20'
400 {"error":{"code":"range_not_covered","message":"Holiday data for FR covers 2025, 2026, 2027, 2028 only; 2029 is outside it."}}curl 'https://clockcrest.com/api/v1/business-days/add?country=ZZ&start=2026-12-01&days=5'
404 {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}404: No holiday data for that country.
جرّبها في ساحة التجربة
GET /api/v1/business-days/next
هل التاريخ يوم عمل، وما يوم العمل التالي. هل التاريخ يوم عمل في الدولة (وإن لم يكن، فما السبب) وما أول يوم عمل يأتي بعده.
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/business-days/next?country=FR&date=2026-12-24'
{
"country": "FR",
"countryName": "France",
"date": "2026-12-24",
"weekday": "Thursday",
"isBusinessDay": true,
"reason": null,
"holiday": null,
"nextBusinessDay": "2026-12-28",
"nextBusinessDayWeekday": "Monday",
"daysUntilNext": 4,
"weekend": ["Sunday", "Saturday"],
"rules": "Weekend days and nationwide public holidays are not business days; regional holidays are treated as business days. \"nextBusinessDay\" is strictly after \"date\".",
"notes": [
"No special weekend is documented for FR: Saturday–Sunday is assumed. Countries with a documented different weekend: BD, BH, DZ, EG, IL, IQ, IR, JO, KW, LY, MV, NP, OM, PS, QA, SA, SD, SY, YE."
],
"source": "Nager.Date",
"sourceUrl": "https://date.nager.at",
"lastUpdated": "2026-11-30",
"dataYears": [2025, 2026, 2027, 2028]
}حقول الرد (20)
المخطط: #/components/schemas/NextBusinessDay
جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/business-days/next?country=FR&date=2026-02-30'
400 {"error":{"code":"invalid_date","message":"Parameter \"date\" must be a calendar date like 2026-12-01."}}curl 'https://clockcrest.com/api/v1/business-days/next?country=ZZ&date=2026-12-24'
404 {"error":{"code":"country_not_found","message":"No public-holiday data for country \"ZZ\"."}}404: No holiday data for that country.
جرّبها في ساحة التجربة
التواريخ والتقاويم
حسابات التواريخ، وأسابيع ISO، وتقاويم الأشهر، والتحويل بين أنظمة التقويم.
GET /api/v1/calendar
تقويم شهر مع أسابيع ISO وعطلة نهاية الأسبوع والعطل. شهر موزَّع على أسابيع ISO (الإثنين أولاً) مع أرقامها. مع المعامل country تُعلَّم أيام عطلة نهاية الأسبوع والعطل الرسمية في تلك الدولة وتُعدّ أيام العمل فيها.
أداة MCP: get_calendar
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/calendar?country=FR&year=2026&month=12'
{
"year": 2026,
"month": 12,
"monthName": "December",
"country": "FR",
"countryName": "France",
"weekStart": "Monday",
"weekend": ["Sunday", "Saturday"],
"daysInMonth": 31,
"businessDays": 22,
"weeks": [
{
"isoWeek": 49,
"isoWeekYear": 2026,
"days": [
null,
// … 6 more
]
},
// … 4 more
],
"holidays": [
{
"date": "2026-12-25",
"name": "Christmas Day",
"localName": "Noël",
"nationwide": true,
"types": ["Public"]
}
],
"notes": [
"Rows are ISO 8601 weeks (Monday to Sunday); null cells pad the first and last week. Week 1 is the week that contains the first Thursday of the year.",
// … 2 more
],
"source": "Nager.Date",
"sourceUrl": "https://date.nager.at",
"dataYears": [2025, 2026, 2027, 2028],
"lastUpdated": "2026-11-30"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (33)
المخطط: #/components/schemas/MonthCalendar
جارٍ التحميل…
أمثلة على الأخطاء (2)
curl 'https://clockcrest.com/api/v1/calendar?year=2026&month=13'
400 {"error":{"code":"out_of_range","message":"Parameter \"month\" must be between 1 and 12."}}curl 'https://clockcrest.com/api/v1/calendar?country=FR&year=2031&month=1'
404 {"error":{"code":"year_not_found","message":"No holiday data for 2031. Available years for FR: 2025, 2026, 2027, 2028."}}404: No holiday data for that country or year.
جرّبها في ساحة التجربة
GET /api/v1/calendar/convert
تحويل تاريخ بين أنظمة التقويم. يحوّل تاريخاً بين التقويم الميلادي والهجري (أم القرى) والفارسي (الهجري الشمسي) والعبري. تذكر ملاحظات الرد نوع التقويم الهجري المستخدم والتنبيه الخاص برؤية الهلال.
أداة MCP: convert_calendar
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/calendar/convert?date=2026-12-01&from=gregorian&to=islamic-umalqura'
{
"input": {
"calendar": "gregorian",
"year": 2026,
"month": 12,
"day": 1,
"monthName": "December",
"date": "2026-12-01"
},
"result": {
"calendar": "islamic-umalqura",
"year": 1448,
"month": 6,
"day": 21,
"monthName": "Jumada II",
"date": "1448-06-21"
},
"gregorian": "2026-12-01",
"weekday": "Tuesday",
"notes": [
"Months are numbered by their position in the year. A Hebrew leap year has 13 months (Adar I = 6, Adar II = 7); month names are the English names from the runtime's CLDR data.",
// … 3 more
],
"supportedCalendars": ["gregorian", "islamic-umalqura", "persian", "hebrew"],
"source": "ICU / CLDR calendars (runtime Intl)"
}مختصر: القوائم الطويلة تعرض عنصرها الأول ثم سطراً بالشكل «// … N more».
حقول الرد (19)
المخطط: #/components/schemas/CalendarConversion
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/calendar/convert?date=2026-12-01&from=gregorian&to=islamic-civil'
400 {"error":{"code":"invalid_calendar","message":"Parameter \"to\" must be one of: gregorian, islamic-umalqura, persian, hebrew. Other calendars (including islamic-civil) are not supported."}}جرّبها في ساحة التجربة
GET /api/v1/date/difference
الفرق بين تاريخين. عدد الأيام بين تاريخين، معبَّراً عنه أيضاً بالأسابيع والأيام، وبالسنوات والأشهر والأيام.
أداة MCP: calculate_date_difference
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/date/difference?start=2024-02-29&end=2026-12-01'
{
"start": "2024-02-29",
"startWeekday": "Thursday",
"end": "2026-12-01",
"endWeekday": "Tuesday",
"days": 1006,
"negative": false,
"weeks": {
"weeks": 143,
"days": 5
},
"calendar": {
"years": 2,
"months": 9,
"days": 2
},
"notes": [
"\"days\" is end minus start (the end date is not counted; negative when end is before start). \"weeks\" and \"calendar\" describe the absolute difference.",
"\"calendar\" counts whole years and months first, then the remaining days; a month-end start is clamped (31 January + 1 month = 28 or 29 February)."
],
"source": "Proleptic Gregorian calendar arithmetic"
}حقول الرد (15)
المخطط: #/components/schemas/DateDifference
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/date/difference?start=2026-02-29&end=2026-03-01'
400 {"error":{"code":"invalid_date","message":"Parameter \"start\" must be a calendar date like 2026-12-01."}}جرّبها في ساحة التجربة
GET /api/v1/date/add
إضافة سنوات وأشهر وأسابيع وأيام إلى تاريخ. يضيف سنوات وأشهراً وأسابيع وأياماً (أو يطرحها إذا كانت القيم سالبة). تُطبَّق السنوات والأشهر أولاً مع الوقوف عند آخر يوم في الشهر عند الحاجة، ثم الأسابيع والأيام.
أداة MCP: add_duration
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/date/add?date=2024-01-31&months=1'
{
"date": "2024-01-31",
"weekday": "Wednesday",
"added": {
"years": 0,
"months": 1,
"weeks": 0,
"days": 0
},
"result": "2024-02-29",
"resultWeekday": "Thursday",
"resultIsoWeek": 9,
"resultIsoWeekYear": 2024,
"daysBetween": 29,
"notes": [
"Years and months are added first, clamping to the last day of the month when needed (31 January + 1 month = 28 or 29 February); weeks and days are added afterwards."
],
"source": "Proleptic Gregorian calendar arithmetic"
}حقول الرد (14)
المخطط: #/components/schemas/DateAdd
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/date/add?date=2026-01-31'
400 {"error":{"code":"missing_parameter","message":"Give at least one of \"years\", \"months\", \"weeks\" or \"days\"."}}جرّبها في ساحة التجربة
GET /api/v1/date/week-number
رقم أسبوع ISO لتاريخ. رقم الأسبوع وسنة الأسبوع وفق ISO 8601 لتاريخ معيّن، مع يومَي الإثنين والأحد من ذلك الأسبوع، وترتيب اليوم في السنة، وهل السنة كبيسة.
المعاملات
التخزين المؤقت
Cache-Control: public, max-age=86400 ✓ أُرسلت في الرد الملتقَط
مثال على الطلب والرد
curl 'https://clockcrest.com/api/v1/date/week-number?date=2027-01-01'
{
"date": "2027-01-01",
"weekday": "Friday",
"isoWeekday": 5,
"isoWeek": 53,
"isoWeekYear": 2026,
"isoWeekDate": "2026-W53-5",
"weeksInIsoYear": 53,
"weekStart": "2026-12-28",
"weekEnd": "2027-01-03",
"dayOfYear": 1,
"daysInYear": 365,
"isLeapYear": false,
"notes": [
"ISO 8601 week numbering: weeks start on Monday and week 1 is the week with the year's first Thursday, so the first and last days of a year can belong to a week of the neighbouring year (\"isoWeekYear\")."
],
"source": "ISO 8601 week date (proleptic Gregorian calendar)"
}حقول الرد (14)
المخطط: #/components/schemas/WeekNumber
جارٍ التحميل…
أمثلة على الأخطاء (1)
curl 'https://clockcrest.com/api/v1/date/week-number?date=01/01/2027'
400 {"error":{"code":"invalid_date","message":"Parameter \"date\" must be a calendar date like 2026-12-01."}}جرّبها في ساحة التجربة