CALENDAR AND GEOMETRY BOUNDARY CHECKS

Checking duplicate dates in a weekday exclusion list

The Business Days Calculator treats the holiday list as a set of dates. A repeated date counts once, and a date that falls on a weekend removes nothing. This guide checks both with one fixed week.

The counting rule

The Business Days Calculator counts each date d where the start is on or before d, d falls before the end, d is a Monday through Friday, and d is not in the supplied exclusion set. The end date is outside the count. Two things follow from that definition. A date listed twice is a single member of the set, so it is removed once. A date that is not a weekday is never counted in the first place, so listing it takes nothing away. This guide checks both consequences by changing the exclusion list while holding the interval fixed.

Five weekdays in the interval

The interval runs from Monday 2026-10-19 up to Monday 2026-10-26, with the end date excluded. It contains seven dates: Monday through Sunday. Five of them are weekdays, from October 19 through October 23, and the other two are Saturday October 24 and Sunday October 25. With no exclusions, the count is 5. Starting with this baseline is useful because every later result can be compared with it, and any difference is attributable to the exclusion list alone. The weekday names matter for the check, so confirm them against a calendar before entering dates.

One excluded weekday

Add Tuesday 2026-10-20 as the only exclusion. That date is in the interval and it is a weekday, so it qualifies for removal. The count falls from 5 to 4. The remaining weekdays are Monday the 19th, Wednesday the 21st, Thursday the 22nd and Friday the 23rd. This is the straightforward case that most users expect: one holiday on a working day reduces the business-day count by one. It is the reference result for the next two tests, which add entries to the list without changing the answer. Project planners rely on this property when they maintain one master list of company holidays, since the same list can be pasted into every schedule without trimming it to each date range, and the tool still produces a correct count for each one of them.

A repeated date and a weekend entry

Now enter the list as 2026-10-20, 2026-10-20, 2026-10-24. The first two entries are the same Tuesday. The third is Saturday October 24. The set contains two distinct dates, and only one of them is a weekday inside the count. The result is still 4. Neither the repetition of the Tuesday nor the Saturday entry removes a second weekday. A tool that subtracted one for each entry in the list would return 2, which would be wrong. Pasting a list from several sources often produces repeats, and the set behavior protects the count from them. A shared national holiday that appears in both a company list and a customer list is a typical example, and a weekend entry shows up when a holiday falls on Saturday and both lists record the original date without an observed date.

Two different weekdays

To confirm that the list does remove distinct weekdays, enter Wednesday 2026-10-21 and Thursday 2026-10-22. Both are weekdays inside the interval, and they are different dates, so each removes one. The count becomes 3. Compare that with the repeated Tuesday above: two entries produced a reduction of one there and a reduction of two here. What matters is the number of distinct qualifying dates, not the number of entries. A quick way to predict the answer by hand is to take the weekday count and subtract the number of distinct listed dates that fall on weekdays inside the interval.

A longer interval

Extend the end to Monday 2026-11-02, so the interval covers two full weeks. It contains 14 dates and 10 weekdays, five from October 19 to 23 and five from October 26 to 30. With Tuesday 2026-10-20 excluded, the count is 9. The same rules apply: only weekdays inside the interval are affected, and only once each. Longer intervals make it more likely that a list contains dates outside the range, such as holidays from the previous month, which have no effect on the answer. Keeping one reusable list and letting the tool ignore irrelevant dates is a practical way to work.

Predicting the result by hand

A hand count is quick once the rule is clear. Count the weekdays in the interval, list the distinct dates in the exclusion set that fall on those weekdays, and subtract. For the week starting October 19, the baseline is 5. Entering Tuesday twice and a Saturday gives one distinct qualifying date, so the answer is 4. Entering Wednesday and Thursday gives two, so the answer is 3. For the two-week interval, the baseline is 10 and the single Tuesday gives 9. When the tool returns something different from this hand count, one of three things happened: a date was typed in the wrong format, a date fell outside the interval, or the interval itself was entered differently from what you meant. Checking those three usually resolves the difference quickly, and it is faster than reading the code that produced the result.

The list is user supplied

The tool does not know which dates are public holidays in any country, state or company. It applies only the dates given to a model in which Monday through Friday are working days. Regions with a different working week, such as a Sunday to Thursday week, or employers that observe floating holidays, are not covered by the weekday rule. Verify the holiday dates against an official or company calendar for the correct jurisdiction, and enter them in the year-month-day format. If a holiday falls on a weekend and is observed on a nearby weekday, enter the observed date.

Checking your own list

Before trusting a count for a project plan, a delivery estimate or a notice period, run three quick tests. Enter an empty list and confirm the weekday count against a calendar. Enter a single weekday and confirm the count drops by one. Then enter the same date twice and a weekend date, and confirm the count is unchanged from the single-date result. If all three behave as in this guide, the list format is being read correctly, and the same list can be reused with confidence for other date ranges. A date typed in the wrong format or a stray character is usually the cause when one of the tests fails.

Reproduce the checks

One excluded weekday

Open the Business Days Calculator and enter:

Start
2026-10-19
End
2026-10-26
Holiday dates (optional)
2026-10-20

Expected output:

Business days

4

One qualifying date is removed.

Repeated weekday and weekend entry

Open the Business Days Calculator and enter:

Start
2026-10-19
End
2026-10-26
Holiday dates (optional)
2026-10-20,2026-10-20,2026-10-24

Expected output:

Business days

4

Neither duplicate exclusion nor weekend entry removes another weekday.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks