Days between dates: should both endpoints count?
Two different answers to “How many days between these dates?” can reflect two valid counting rules. One measures the gap; the other counts every date included in a period.
A gap or a list of attendance days?
From 10 October to 13 October there are 3 moves to the next date. The inclusive list contains 10, 11, 12 and 13 October: 4 dates. This is why nights of accommodation and days of an event need not match.
For the same start and end date, the gap is 0 days but the inclusive count is 1. Keep the counting convention beside any result used in a schedule or agreement.
February does not always have 28 days
Gregorian years divisible by 4 are leap years, except century years unless divisible by 400. Thus 2028 is a leap year, but 2100 is not.
Multiplying months by 30 is not a reliable date difference. Crossing a month or year boundary does not change the counting rule, but it changes the actual dates encountered.
References: US Naval Observatory — Leap years
Dates alone do not determine elapsed hours
Calendar-day counting needs no time of day or time zone. It cannot, however, precisely measure hours between events: crossing a daylight-saving transition can make the next local date less or more than 24 hours away.
Keep the clock time and time zone for time-critical appointments. Ordinary date differences also include weekends; working-day counting is a separate question.
References: MDN — Date.setDate and daylight-saving transitions
Worked example: event dates and preparation time
An exhibition running from 2026-10-10 through 2026-10-13 includes 4 calendar dates if it opens on both endpoints. A team measuring the gap from the beginning of 10 October to the beginning of 13 October counts 3 calendar days.
From 2028-02-28 to 2028-03-01 the gap is 2 days because 29 February exists. The corresponding gap in 2027 is 1 day. These are calendar examples, not elapsed-hour measurements for a particular time zone.