# Reference data

Ground-truth datasets for testing any Persian (Solar Hijri / Jalali) calendar implementation. For a complete guide on how to use these files in your tests, see [docs/en/09-testing.md](https://goudarzjafari.com/persian-calendar/testing/) · [فارسی](https://goudarzjafari.com/fa/persian-calendar/testing/).

| File                                                                                                                   | Description                                                                                                              |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [`years.csv`](https://goudarzjafari.com/persian-calendar/files/data/years.csv)                                         | All 1,823 years from 1178 to 3000 AP: `year, is_leap, days_in_year, nowruz_gregorian, nowruz_jdn, nowruz_weekday`        |
| [`test-vectors.csv`](https://goudarzjafari.com/persian-calendar/files/data/test-vectors.csv)                           | 8,510 boundary conversion test cases: `jy, jm, jd, gy, gm, gd, jdn, weekday`                                             |
| [`leap-years.txt`](https://goudarzjafari.com/persian-calendar/files/data/leap-years.txt)                               | All 442 leap years in 1178–3000 AP (one year per line)                                                                   |
| [`corrections.txt`](https://goudarzjafari.com/persian-calendar/files/data/corrections.txt)                             | The 78 years in 1178–3000 AP where the plain 33-year rule must be adjusted                                               |
| [`locale-names.json`](https://goudarzjafari.com/persian-calendar/files/data/locale-names.json)                         | Localized month names, weekday names, and era strings from Unicode CLDR 48 across 11 locales                             |
| [`official/kabise-1206-1498.txt`](https://goudarzjafari.com/persian-calendar/files/data/official/kabise-1206-1498.txt) | Official leap-year table of the University of Tehran Calendar Center (plain-text CC0 transcription by Roozbeh Pournader) |

**Conventions:** Months are `1..12` (`1 = Farvardin`); weekdays are `0 = Saturday … 6 = Friday`; `jdn` is the standard Julian Day Number; Gregorian dates use the proleptic Gregorian calendar; all files use UTF-8 encoding with LF (`\n`) line endings.

**Do not edit these files by hand.** The `.csv` and `.txt` files are generated automatically by the astronomical engine in [`tools/calendar-data`](https://goudarzjafari.com/persian-calendar/tools/calendar-data/)
(`cargo run --release`), which first verifies its output against the official Calendar Center table.
`locale-names.json` is generated from CLDR by [`tools/generate_locale_data.mjs`](https://github.com/Goudarz/PersianCalendar/blob/main/tools/generate_locale_data.mjs).

**License:** All generated files and `official/kabise-1206-1498.txt` are dedicated to the public domain under [CC0 1.0](https://creativecommons.org/publicdomain/zero/1.0/).

---

Page: https://goudarzjafari.com/persian-calendar/data/
License: text CC BY 4.0, code MIT, data CC0 1.0. Version 1.0.0 of https://github.com/Goudarz/PersianCalendar
