Skip to content

fix(qiddiyacity): parse "Weekdays/Weekends" wording in website schedule#262

Merged
cubehouse merged 1 commit into
mainfrom
fix/qiddiya-weekdays-weekends-schedule
Jul 20, 2026
Merged

fix(qiddiyacity): parse "Weekdays/Weekends" wording in website schedule#262
cubehouse merged 1 commit into
mainfrom
fix/qiddiya-weekdays-weekends-schedule

Conversation

@cubehouse

Copy link
Copy Markdown
Member

Problem

Six Flags Qiddiya City's calendar stopped populating. The website megaMenu now
labels its two schedule strings "Weekdays: 4 PM - 12 AM" / "Weekends: 4 PM - 12 AM"
instead of day ranges. getWebsiteSchedule()'s parser only understood day names
("Wed to Fri", "Saturdays"), so the current wording parsed to an empty weekly map
and the calendar fell back to today-only (which is blank whenever the park is
pre-open, i.e. isOpen:false).

Fix

  • Parse the literal Weekdays/Weekends wording using the Saudi work week
    (weekend = Fri/Sat, weekdays = Sun–Thu).
  • Keep the existing day-range / single-day parsing intact.
  • Lift the parsing out of the class into an exported pure
    buildWeeklyScheduleFromMegaMenu(lws) so it's unit-testable without network/cache.

Tests

Added buildWeeklyScheduleFromMegaMenu tests covering the current Weekdays/Weekends
format, legacy day-range format, closed-day removal, and empty input. Full suite:
1495 tests pass. Verified end-to-end against live data: schedule now yields 5
open days/week (Sun/Wed/Thu/Fri/Sat, 16:00→00:00), Mon/Tue dropped as closed, with
correct midnight rollover and Asia/Riyadh offset.

🤖 Generated with Claude Code

The site's megaMenu now labels its two schedule strings "Weekdays: 4 PM - 12 AM"
/ "Weekends: 4 PM - 12 AM" rather than day ranges. The parser only understood
day names ("Wed to Fri", "Saturdays"), so it produced an empty weekly map and
the calendar fell back to today-only.

Handle the literal Weekdays/Weekends wording (Saudi week: weekend Fri/Sat,
weekdays Sun-Thu), keep existing day-range parsing, and lift the logic into an
exported pure buildWeeklyScheduleFromMegaMenu() with tests for both formats.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cubehouse
cubehouse merged commit e03e468 into main Jul 20, 2026
4 checks passed
@cubehouse
cubehouse deleted the fix/qiddiya-weekdays-weekends-schedule branch July 20, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant