# prayertimes data `csv/` is every island's table, taken verbatim from the Salat MV export at . Files are named by island id; `config/prayertimes/islands.conf` maps ids to names and picks which are shown. Home-manager links `csv/` to `~/.local/share/prayertimes/`. Each row is `day,month,fajr,sunrise,dhuhr,asr,maghrib,isha`, times `H:MM` in 24-hour local time -- the generator folds each island's offset from Male' into the values. ## The day and month columns are a day out `scripts/prayertimes.sh` addresses rows by line number, not by the `day,month` they carry. Upstream's `convert.js` labels each row with `moment().dayOfYear(Date).year(2024)`, which sets the day number against the *current* year and only then rewrites the year, so in a common year the leap-year intent is lost: row 1 is labelled 31 December instead of 1 January, 29 February never appears, and 31 December appears twice. `Date` in the upstream `salat.db` runs 0..365 and `Date 0` is 1 January. The sibling `out/` files, `prayertime.sh` (which indexes them with `date +%j - 1`) and the four test vectors in the db's own readme all agree. So, rows numbered from 1: row = day_of_year in a leap year row = day_of_year + 1 in a common year, from 1 March on The `+ 1` skips the 29 February row every table carries. That reproduces all four upstream test vectors for Male' (102) -- 1 January Dhuhr 12:13 and Isha 19:25, 2 March Dhuhr 12:22 and Asr 15:35 -- in leap and common years alike, which the `day,month` labels do not. Every file must therefore stay exactly 366 lines, in order, with no header. ## Hijri dates The tooltip's Hijri date comes from a 720 byte Umm al-Qura month-length table embedded in the script, covering 1440-1499 AH (2018-09-11 to 2076-11-26). Arithmetic Hijri calendars are a day off Umm al-Qura roughly half the time, which the table avoids. Umm al-Qura is itself a calculated calendar, so it can still differ from a locally announced sighting.