New Tool Radar

AI Research & Fact-Checking

How to Check a Count of Days Between Two Dates Across a Year Boundary

Count the days between two dates across a year boundary by subtracting the dates, because 20 December 2026 to 10 January 2027 is 21 days, not 20.

Schematic diagram: an AI answer says 20 December 2026 to 10 January 2027 is 20 days, while subtracting the dates gives 21 days; the verdict is Wrong.

Counting days across New Year is where off-by-one errors hide. From 20 December 2026 to 10 January 2027 is 21 days: 11 days left in December plus 10 days in January. An AI answer that adds 10 and 10, or counts both end dates, will be a day out, and a day out on a loan or a deadline is a real error.

Timeanddate’s FAQ for its Date to Date Calculator states the counting rule plainly: checking Include end date in calculation counts the final day in your result. An event from the 1st to and including the 4th day of the month is 4 days with that box checked, and 3 days without it. The default count is end date minus start date, with the end date not counted.

Use the practice loans

The loans below are synthetic. They are about a fictional library loan record, and they were not produced by any AI tool. They are the only source for the exercise.

Practice loans — Northfield Library loan record:

  • Loan A: 20 December 2026 to 10 January 2027.
  • Loan B: 30 November 2026 to 5 January 2027.
  • Loan C: 24 December 2026 to 2 January 2027.

Practice AI answer: "Loan A lasted 20 days, Loan B lasted 36 days, and Loan C lasted 9 days."

Check each count by subtracting the dates

Expected result. We checked the timeanddate.com FAQ for the Date to Date Calculator. We did not run an AI tool on the practice loans. The checked list below is what to expect if the figures are correct; run the same check yourself on the practice material above.

Loan AI answer says Correct (end − start) Verdict
20 Dec 2026 to 10 Jan 2027 20 days 21 days (11 days left in Dec + 10 in Jan) Wrong — a day short
30 Nov 2026 to 5 Jan 2027 36 days 36 days (31 days to 31 Dec + 5 in Jan) Correct
24 Dec 2026 to 2 Jan 2027 9 days 9 days (7 days to 31 Dec + 2 in Jan) Correct

Subtract, then say whether the end date counts

The wrong row added the two month parts as 10 and 10, forgetting that December has 31 days, so 20 December to 31 December is 11 days, not 10. The trap is that the year boundary makes the count look like two small additions, and the month length of December is the part that gets skipped.

To check one yourself, subtract the start date from the end date, counting the days left in the start month first, then the full months, then the days in the end month. Then say which count you mean: end minus start is the gap, and adding one counts both end dates. If the AI does not say which it used, ask.

What to do with each verdict

  • Correct: keep the day count, and keep both dates with it so the next reader can recompute the subtraction.
  • Wrong: replace it with the end date minus the start date, showing the month-by-month working. Do not keep the wrong count and add a note; a wrong day count in a loan record will be copied.
  • Counting rule unclear: do not guess whether the end date counts. Ask first; the two counts differ by exactly one day.

Limits

  • This guide counts calendar days between two dates. It does not count working days, which exclude weekends and holidays, or business days, which need a holiday list.
  • Leap years change February, not the year boundary: a span across 29 February needs the leap day counted, but a span across 31 December does not.
  • The calculators this check follows ignore daylight-saving clock changes, because they count calendar days, not hours between two moments.
  • No AI tool was run for this guide. The practice loans and answer are synthetic.

Sources

See all