Schedule & Holidays: Time-Based Module Logic
Datetime ranges, weekly recurring schedules, timezone handling, and centralized public holiday database. Schedule discounts, content, and features by time.
Time-aware modules
Many modules need time-based logic: apply a discount only on weekdays, show a banner during business hours, disable a feature on public holidays, schedule content for a specific date range.
The Schedule & Holidays packages provide shared infrastructure for all time-based module behavior.
Schedule widget
A reusable admin widget for defining time-based rules:
- Datetime ranges: start and end date/time with calendar pickers
- Weekly schedules: visual timeline sliders for recurring weekly patterns (e.g., "weekdays 9am-5pm")
- Timezone: schedules are evaluated in the server's PHP timezone, which the admin screens state explicitly
Public holiday database
A centralized mpr_public_holidays table shared across all modules that need holiday awareness:
- Country-specific: holidays per country, so a German store and a French store get different holiday calendars
- Shared data: a holiday is entered once and any module that reads the holiday provider can use it
- Holiday exclusions: schedule rules can exclude public holidays ("apply on weekdays except holidays")
Used by
Search Revolution uses the schedule conditions and the holiday provider for time-based result boosting. Sales Revolution installs the holiday package; its discount scheduling uses its own fields. Any module can use the schedule API when it implements time-based behaviour.
← Back to Our Technology Stack