# `mix calendrical.umm_al_qura.verify`

Verifies the Umm al-Qura tables embedded in Calendrical and, optionally,
compares them with KACST's official data or another reference.

`Calendrical.Islamic.UmmAlQura` is a tabular calendar built at compile
time from the official month lengths published by KACST (King Abdulaziz
City for Science and Technology), stored in
`priv/umm_al_qura_month_lengths.csv`. This task audits the compiled
calendar. It never modifies the data.

It checks that:

* every year is 354 or 355 days long.

* every month starts the day after the previous month ends.

* the first and last day of every month convert to the Gregorian
  calendar and back unchanged.

## Usage

    mix calendrical.umm_al_qura.verify
    mix calendrical.umm_al_qura.verify --kacst
    mix calendrical.umm_al_qura.verify --against reference.txt

## Options

* `--kacst` downloads KACST's official month lengths and compares them
  with the embedded tables, to find out whether KACST has revised any
  month since this version of Calendrical was released.

* `--against PATH` checks the external reference in `PATH` and compares
  it with the embedded tables.

## Reference file format

One month per line: the Hijri year, the Hijri month and the Gregorian
date of the first day of that month, separated by whitespace. Blank
lines and lines starting with `#` are ignored.

    # year month first_day
    1446 9 2025-03-01
    1446 10 2025-03-30

## Exit status

The task fails if the embedded tables break one of the checks above, or
if KACST's data or the reference is malformed or gives a different first
day for any month that both it and the embedded tables cover. Months
covered by only one side are reported but do not fail the task.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
