Skip to content

B3: Annual entries that cross New Year never match #14

Open

Description

@caseysoftware

Annual entries are matched with DATE_FORMAT(holiday_start_date, '%m-%d') <= 'MM-DD' AND DATE_FORMAT(holiday_end_date, '%m-%d') >= 'MM-DD'. For a range like Dec 24 – Jan 2, start (12-24) is after end (01-02), so no date ever matches.

Fix: handle start > end as two ranges, or store annual entries as one row per day.

Files: holiday_functions.class.php (every holiday_annual=1 query: isHoliday(), getBlacklistForDatespan(), getWhitelistForDatespan(), getHolidayTitle())

Evidence: found by reading the code against master; not reproduced on a running install.
Effort: S

Part of #1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions