feat(arknights): track Arknights from its own wiki
The most-named game in the release thread, and the cheapest one to add: the GameId, hue and dailyTasks have been sitting in games.ts since launch with no source behind them. arknights.wiki.gg is a better source than Game8 for this game, but it is not the mp-event shape wikigg.ts reads, so it gets its own parser. Two properties of the page drive the code: - Every row lists CN and Global, about five months apart. Only Global is published; a row without one yields no event rather than borrowing the CN date. A CN date on a Global calendar is a confidently wrong date. - Only the next boundary carries a machine-readable timer — the end while an event runs, the start while it is upcoming — so precision differs per side and flips when the event goes live. An exact instant is accepted only when it falls on the same UTC day as the date beside it, because startsAt.slice(0, 10) is part of the event ID: a start that moved a day would orphan every completion mark on the morning the event began. Also sets resetOffsets for all three regions to UTC-7. Not a blanket per-game offset — Arknights genuinely runs one Global server for every region we model, and the page evidences the clock: every ending event ends at 10:59:59Z, which is 03:59:59 at UTC-7, one second before a 04:00 reset. Six events, counted independently against the page before and after parsing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8c2ec19c22
commit
1dd58d3f52
@@ -255,9 +255,16 @@ reader cannot see.
|
||||
|---|---|---|---|---|
|
||||
| Genshin, Star Rail, ZZZ, Wuwa, NTE | 04:00 | region (EU = UTC+1) | 03:00 | 05:00 / 04:00 |
|
||||
| Infinity Nikki, P5X | 04:00 | region (assumed) | 03:00 | 05:00 / 04:00 |
|
||||
| Arknights, all regions | 04:00 | UTC-7 (one Global server) | 11:00 | 13:00 / 12:00 |
|
||||
| Endfield, Europe | 04:00 | UTC-5 (on the Americas server) | 09:00 | 11:00 / 10:00 |
|
||||
| Endfield, Asia / Americas | 04:00 | regional default | 20:00 / 09:00 | — |
|
||||
|
||||
Arknights is the one game whose override covers **all three** regions, and it is not a blanket
|
||||
per-game offset of the kind this section warns about below: the game genuinely runs a single Global
|
||||
server for every region we model. The offset is read off the source rather than assumed — every
|
||||
ending event on arknights.wiki.gg carries an exact end of `10:59:59Z`, which is `03:59:59` at UTC-7,
|
||||
one second before a 04:00 reset.
|
||||
|
||||
Infinity Nikki and P5X carry **no `resetOffsets` entry**, so they take the regional default. That is
|
||||
an assumption, not a verified server map — neither source states one. Confirm it against the games
|
||||
before relying on it, and note that adding an override later re-labels the game-day of ticks readers
|
||||
|
||||
@@ -47,11 +47,25 @@ Consequences worth internalising:
|
||||
|---|---|---|
|
||||
| `game8` | game8.co article calendars | Genshin, Star Rail, Wuthering Waves, ZZZ, Endfield, NTE, Infinity Nikki, Persona 5: The Phantom X |
|
||||
| `wikigg` | wiki.gg MediaWiki `mp-event` templates | Endfield |
|
||||
| `akwiki` | arknights.wiki.gg's `mrfz-wtable` "Ongoing/upcoming" table | Arknights |
|
||||
|
||||
`wikigg` is the better shape by a distance: it emits ISO timestamps with one timer per server
|
||||
region, so its events carry exact precision and real `regionEnds`. Prefer a source like that over a
|
||||
prose wiki when both exist, and give it a higher `priority`.
|
||||
|
||||
`akwiki` shares a host family with `wikigg` and nothing else — arknights.wiki.gg has no `mp-event`
|
||||
cards, so the two are separate modules rather than one parser with a branch. Two things about that
|
||||
page shape are worth knowing before touching it:
|
||||
|
||||
- **Every row states two schedules, CN and Global, about five months apart.** Only Global is
|
||||
published. A row with no Global line yields no event rather than borrowing the CN one.
|
||||
- **Only the next boundary is machine-readable.** The countdown sits on the end while an event runs
|
||||
and on the start while it is still upcoming, so one side is exact and the other is the table's
|
||||
date — and which is which flips when the event goes live. An exact instant is therefore accepted
|
||||
only when it falls on the same UTC day as the date beside it, because `startsAt.slice(0, 10)` is
|
||||
part of the event ID and a start that moved a day would orphan every completion mark on the
|
||||
morning the event began.
|
||||
|
||||
### Date formats understood
|
||||
|
||||
All live in `src/ingest/dates.ts`, each returning null rather than inferring anything:
|
||||
@@ -65,6 +79,7 @@ All live in `src/ingest/dates.ts`, each returning null rather than inferring any
|
||||
| `parseSlashDateTimeRange` | `2021/01/16 04:00 - 2021/01/31 03:59` | Genshin past events |
|
||||
| `parseLabelledStartEnd` | `Start: January 24, 2025 End: Permanent` | Infinity Nikki |
|
||||
| `parseAdjacentFullRange` | `July 30, 2026 August 13, 2026` (halves split by an `<hr>`) | Persona 5: The Phantom X |
|
||||
| `parseYearFirstSlashRange` | `2026/07/30 – 2026/08/20` (year first, so field order is not inferred) | Arknights |
|
||||
| `parseOpenRange` | `Jul. 24, 2026 - End of 4.6`, `July 10, 2026 - Permanent` | Star Rail, Wuthering Waves |
|
||||
|
||||
`parseOpenRange` is tried last because it is the most permissive — it accepts any leading full date
|
||||
|
||||
Reference in New Issue
Block a user