mirror of
https://github.com/rommapp/romm.git
synced 2026-11-28 17:48:31 +01:00
Shows games released on today's date in an earlier year, one at a time, with arrows to page through the rest. Sits in the Home widget rail beside Random pick and Library stats, with its own Settings toggle (default on) and an entry in the drag-reorder list. New endpoint GET /api/roms/anniversaries, ROMS_READ, whole-library, returning up to 24 SimpleRomSchema oldest release first. Clients send their own local month and day so "today" matches the calendar in front of the user rather than the server's UTC clock. The day-of-year match is a union of one-day ranges over generated_first_release_date rather than MONTH()/DAY() on the value. Ranges are sargable, so idx_roms_generated_first_release_date serves both the match and the sort as one covering range scan: 195 rows examined and ~2 ms against 63,334 rows and ~70 ms for the function predicate on a 100k-row table. Emitting no SQL date function also means no dialect branching and no migration. 1 January returns empty. Several providers park year-only metadata there (ScreenScraper parses a bare year with %Y, CSDb publishes nothing else, IGDB reports year precision as 1 January), so nothing in the stored data tells a real 1 January release apart from an unknown day. Leap-day releases roll onto 28 February in non-leap years. Visibility follows /random: filter on hidden platforms and roms, then re-check each hydrated row with perms.can_see_rom. Closes #3440 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>