JDay

Holiday Semantics

How JDay represents holidays — observed dates, plural arrays, and the holiday object model.

JDay uses one consistent holiday object across all endpoints.

Holiday Object

{
  "date": "2026-04-03",
  "official_date": null,
  "name": "Good Friday",
  "local_name": null,
  "type": "public",
  "date_accuracy": "exact"
}

Fields

FieldTypeDescription
datestringThe effective non-working date used by the engine.
official_datestring | nullThe official/legal date when it differs from date, otherwise null.
namestringEnglish display name.
local_namestring | nullLocalized/native name when available, otherwise null.
typestring"public" or "regional".
date_accuracystring"exact" or "estimated".

Observed vs Official Dates

When a holiday falls on a weekend but is observed on a weekday:

  • date contains the weekday observed closure date (the date the engine uses)
  • official_date contains the weekend official date
  • The engine matches against date, not official_date

Plural Arrays

Holiday-bearing responses always use arrays, not singular fields. This is because:

  • Multiple holidays can share the same effective date in a jurisdiction
  • Arrays are always sorted by date ascending, then name ascending as a deterministic tie-breaker

When no holidays apply, the array is empty ([]), never omitted.

Date Accuracy

  • "exact" — Fixed or rule-based dates already determined.
  • "estimated" — Holidays whose final date may shift due to moon sighting or official late confirmation. When an official date is confirmed, JDay updates the data and redeploys.

Reason Precedence

When a response includes a single reason field (e.g., is-business-day), precedence is:

  1. weekend
  2. regional_holiday
  3. public_holiday
  4. business_day

The holidays array may still contain holiday records even if reason is weekend — the reason is the primary classification, not exclusive.

On this page