[
{ "name": "a full Monday-to-Monday week is five working days", "args": ["2026-09-14", "2026-09-21", []], "expect": 5 },
{ "name": "the same date twice is zero: the interval is half-open", "args": ["2026-09-16", "2026-09-16", []], "expect": 0 },
{ "name": "start is inclusive, so one working day spans one night", "args": ["2026-09-16", "2026-09-17", []], "expect": 1 },
{ "name": "end is exclusive: Monday to Tuesday counts Monday only", "args": ["2026-09-14", "2026-09-15", []], "expect": 1 },
{ "name": "the first half of the week composes with the second", "args": ["2026-09-14", "2026-09-16", []], "expect": 2 },
{ "name": "and the second half: 2 plus 3 is the 5 of the whole week", "args": ["2026-09-16", "2026-09-21", []], "expect": 3 },
{ "name": "a weekend on its own has no working days", "args": ["2026-09-19", "2026-09-21", []], "expect": 0 },
{ "name": "Friday to Tuesday crosses a weekend and counts two days", "args": ["2026-09-18", "2026-09-22", []], "expect": 2 },
{ "name": "two holidays inside a Christmas week", "args": ["2026-12-24", "2026-12-29", ["2026-12-25", "2026-12-28"]], "expect": 1 },
{ "name": "the same holiday listed twice is only subtracted once", "args": ["2026-12-24", "2026-12-29", ["2026-12-25", "2026-12-25"]], "expect": 2 },
{ "name": "a holiday falling on a Saturday is not subtracted twice", "args": ["2026-08-28", "2026-09-01", ["2026-08-29"]], "expect": 2 },
{ "name": "a holiday outside the interval is ignored", "args": ["2026-09-14", "2026-09-16", ["2026-12-25"]], "expect": 2 },
{ "name": "a holiday on the start date removes the only working day", "args": ["2026-09-14", "2026-09-15", ["2026-09-14"]], "expect": 0 },
{ "name": "Good Friday and Easter Monday around a weekend", "args": ["2026-04-02", "2026-04-07", ["2026-04-03", "2026-04-06"]], "expect": 1 },
{ "name": "across the new year with New Year's Day as a holiday", "args": ["2026-12-28", "2027-01-04", ["2027-01-01"]], "expect": 4 },
{ "name": "the 2024 leap day is an ordinary working Thursday", "args": ["2024-02-28", "2024-03-01", []], "expect": 2 },
{ "name": "2000 had a leap day, so the same span is still two working days", "args": ["2000-02-28", "2000-03-01", []], "expect": 2 },
{ "name": "1900 had no leap day and the span is two working days from the 27th", "args": ["1900-02-27", "1900-03-01", []], "expect": 2 },
{ "name": "a month-long span", "args": ["2026-09-14", "2026-10-14", []], "expect": 22 },
{ "name": "a reversed interval is negative, not zero", "args": ["2026-09-21", "2026-09-14", []], "expect": -5 },
{ "name": "a reversed interval respects holidays with the same magnitude", "args": ["2026-09-21", "2026-09-14", ["2026-09-16"]], "expect": -4 },
{ "name": "a malformed start date is an error", "args": ["14/09/2026", "2026-09-21", []], "expectError": "is not an ISO date" },
{ "name": "a malformed end date is an error", "args": ["2026-09-14", "2026-09", []], "expectError": "is not an ISO date" },
{ "name": "an impossible end date is an error, not a rolled-forward guess", "args": ["2026-09-14", "2026-02-30", []], "expectError": "is not a real calendar date" },
{ "name": "a malformed holiday is an error even though it is outside the interval", "args": ["2026-09-14", "2026-09-21", ["25/12/2026"]], "expectError": "is not an ISO date" },
{ "name": "an impossible holiday is an error", "args": ["2026-09-14", "2026-09-21", ["2026-11-31"]], "expectError": "is not a real calendar date" }
]