# dates.days-between
End minus start, in calendar days. The same date twice is 0, the next day is
1, and a start after the end is negative rather than an error or zero: a
negative answer makes a swapped argument pair obvious, where a clamped zero
would hide it.
This is the difference of the two dates, not a count of days "including both
ends". 1 January to 31 January is 30. If you need an inclusive count (a hotel
night count is the difference; a leave request "1st to 5th inclusive" is the
difference plus one), add one yourself, deliberately.
Days are calendar days on the civil calendar, so there are no time zones and no
daylight-saving hours to lose: 29 March 2026 to 30 March 2026 is 1 in every
country. Working days are dates.business-days-between.
Both dates are validated strictly by the dates.add-days kernel (2026-02-30 is an
error, not 2 March), and the arithmetic is that kernel's day numbers, so dates
before 1970 and across centuries are exact.