{"id":"calendar-convert","title":"Convert dates between Gregorian and Hijri (named variants), Hebrew, Persian, Ethiopian; Western and Orthodox Easter","description":"Converts a Gregorian date (or a Hebrew, Persian, Ethiopian or Hijri date) to the other calendars via the runtime's ICU, always naming the Hijri variant (Umm al-Qura, tabular civil, tabular astronomical-epoch, ICU astronomical) and flagging when variants disagree on the day; with mode easter, returns Western (Gregorian computus) and Orthodox (Julian computus, with its Gregorian equivalent) Easter and optional moveable feasts for up to 60 years (Ash Wednesday, Trinity Sunday and Corpus Christi are Western-only and carry no Orthodox date). Covers 1900-2100 Gregorian. Calendar days begin at civil midnight here (Hebrew and Hijri days actually begin at sunset), and observed Islamic dates depend on moon sighting; it gives the computed calendar date, not the observance date.","roi":"Hijri variants place the same Gregorian day on different Hijri dates (Umm al-Qura and the tabular civil calendar differed on 199 of the 365 days of 2026 in this runtime); a deadline or holiday fixed to 'the 1st of Ramadan' needs the variant stated.","audience":"business","package":"calendar-deadline-kit","channels":["x402","mcp"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/calendar-convert","path":"/api/v1/calendar-convert","contentType":"application/json"},"price":{"amount":"0.005","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["convert","easter"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10,"description":"convert: Gregorian date. Exactly one of date or from."},"from":{"type":"object","required":["calendar","year","month","day"],"properties":{"calendar":{"type":"string","enum":["hebrew","persian","ethiopic","islamic-umalqura","islamic-civil","islamic-tbla","islamic-icu"]},"year":{"type":"integer","minimum":1,"maximum":9999},"month":{"type":"integer","minimum":1,"maximum":13,"description":"Numeric month. Hebrew follows ICU: Tishri=1; leap years have Adar I=6, Adar II=7, Nisan=8 ... Elul=13; common years have Adar=6, Nisan=7 ... Elul=12."},"day":{"type":"integer","minimum":1,"maximum":30}}},"to":{"type":"array","maxItems":8,"items":{"type":"string","enum":["hebrew","persian","ethiopic","islamic-umalqura","islamic-civil","islamic-tbla","islamic-icu","hijri-all"]},"description":"Calendars to convert into; hijri-all returns Umm al-Qura, tabular civil and ICU astronomical (add islamic-tbla explicitly; it differs from civil by its epoch) and fails when they disagree. Default: all non-Hijri plus hijri-all."},"years":{"type":"array","minItems":1,"maxItems":60,"items":{"type":"integer","minimum":1583,"maximum":2999},"description":"easter: Gregorian years."},"feasts":{"type":"boolean","description":"easter: also list Ash Wednesday, Good Friday, Ascension, Pentecost and other moveable feasts."}}},"resultSchema":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"gregorian":{"type":"string"},"weekday":{"type":"string"},"conversions":{"type":"array","items":{"type":"object","properties":{"calendar":{"type":"string"},"variant":{"type":"string"},"year":{"type":"integer"},"month":{"type":"integer"},"monthName":{"type":"string"},"day":{"type":"integer"}}}},"hijriVariantsAgree":{"type":"boolean"},"easter":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer"},"western":{"type":"string"},"westernWeekday":{"type":"string"},"orthodoxJulian":{"type":"string"},"orthodoxGregorian":{"type":"string"},"orthodoxWeekday":{"type":"string"},"sameDay":{"type":"boolean"},"feasts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"western":{"type":"string"},"orthodox":{"type":"string"}}}}}}},"reason":{"type":"string"},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"gregorian":{"type":"string"},"weekday":{"type":"string"},"conversions":{"type":"array","items":{"type":"object","properties":{"calendar":{"type":"string"},"variant":{"type":"string"},"year":{"type":"integer"},"month":{"type":"integer"},"monthName":{"type":"string"},"day":{"type":"integer"}}}},"hijriVariantsAgree":{"type":"boolean"},"easter":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer"},"western":{"type":"string"},"westernWeekday":{"type":"string"},"orthodoxJulian":{"type":"string"},"orthodoxGregorian":{"type":"string"},"orthodoxWeekday":{"type":"string"},"sameDay":{"type":"boolean"},"feasts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"western":{"type":"string"},"orthodox":{"type":"string"}}}}}}},"reason":{"type":"string"},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"mode":"convert","date":"2025-06-26","to":["hijri-all","hebrew"]},"openapiOperation":{"operationId":"calendar_convert","summary":"Convert dates between Gregorian and Hijri (named variants), Hebrew, Persian, Ethiopian; Western and Orthodox Easter","description":"Converts a Gregorian date (or a Hebrew, Persian, Ethiopian or Hijri date) to the other calendars via the runtime's ICU, always naming the Hijri variant (Umm al-Qura, tabular civil, tabular astronomical-epoch, ICU astronomical) and flagging when variants disagree on the day; with mode easter, returns Western (Gregorian computus) and Orthodox (Julian computus, with its Gregorian equivalent) Easter and optional moveable feasts for up to 60 years (Ash Wednesday, Trinity Sunday and Corpus Christi are Western-only and carry no Orthodox date). Covers 1900-2100 Gregorian. Calendar days begin at civil midnight here (Hebrew and Hijri days actually begin at sunset), and observed Islamic dates depend on moon sighting; it gives the computed calendar date, not the observance date.\n\nPrice: 0.005 USDC on Base (x402).","x-x402-price-usdc":"0.005","x-x402-amount":"5000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.005"}},"x-audience":"business","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/calendar-convert","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["mode"],"properties":{"mode":{"type":"string","enum":["convert","easter"]},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","maxLength":10,"description":"convert: Gregorian date. Exactly one of date or from."},"from":{"type":"object","required":["calendar","year","month","day"],"properties":{"calendar":{"type":"string","enum":["hebrew","persian","ethiopic","islamic-umalqura","islamic-civil","islamic-tbla","islamic-icu"]},"year":{"type":"integer","minimum":1,"maximum":9999},"month":{"type":"integer","minimum":1,"maximum":13,"description":"Numeric month. Hebrew follows ICU: Tishri=1; leap years have Adar I=6, Adar II=7, Nisan=8 ... Elul=13; common years have Adar=6, Nisan=7 ... Elul=12."},"day":{"type":"integer","minimum":1,"maximum":30}}},"to":{"type":"array","maxItems":8,"items":{"type":"string","enum":["hebrew","persian","ethiopic","islamic-umalqura","islamic-civil","islamic-tbla","islamic-icu","hijri-all"]},"description":"Calendars to convert into; hijri-all returns Umm al-Qura, tabular civil and ICU astronomical (add islamic-tbla explicitly; it differs from civil by its epoch) and fails when they disagree. Default: all non-Hijri plus hijri-all."},"years":{"type":"array","minItems":1,"maxItems":60,"items":{"type":"integer","minimum":1583,"maximum":2999},"description":"easter: Gregorian years."},"feasts":{"type":"boolean","description":"easter: also list Ash Wednesday, Good Friday, Ascension, Pentecost and other moveable feasts."}}},"example":{"mode":"convert","date":"2025-06-26","to":["hijri-all","hebrew"]}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"gregorian":{"type":"string"},"weekday":{"type":"string"},"conversions":{"type":"array","items":{"type":"object","properties":{"calendar":{"type":"string"},"variant":{"type":"string"},"year":{"type":"integer"},"month":{"type":"integer"},"monthName":{"type":"string"},"day":{"type":"integer"}}}},"hijriVariantsAgree":{"type":"boolean"},"easter":{"type":"array","items":{"type":"object","properties":{"year":{"type":"integer"},"western":{"type":"string"},"westernWeekday":{"type":"string"},"orthodoxJulian":{"type":"string"},"orthodoxGregorian":{"type":"string"},"orthodoxWeekday":{"type":"string"},"sameDay":{"type":"boolean"},"feasts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"western":{"type":"string"},"orthodox":{"type":"string"}}}}}}},"reason":{"type":"string"},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/calendar-convert/","docsJson":"https://agents.writerslogic.com/docs/calendar-convert.json","sample":"https://agents.writerslogic.com/api/v1/samples/calendar-convert","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}