Time & Date
Why Inclusive and Exclusive Date Counting Give Different Answers
If a pass is valid August 3 through August 7, it covers five dates. If you check in August 3 and check out August 7, the stay has four nights. Both numbers are correct for those endpoints because the questions count different things.
Count endpoints when each date is an item
Inclusive counting includes both dates. A same-day booking covers one date by this convention. A count of elapsed calendar days measures the steps from the earlier date to the later one, so a same-day comparison is zero.
For a calculation that must exclude both endpoints, count only dates strictly between them. August 3 and August 7 then leave August 4, 5 and 6. State which convention you used, since exclusive can describe more than one endpoint rule.
Keep a calendar period separate from a day total
One calendar month from March 1 to April 1 is 31 elapsed days. One calendar month from April 1 to May 1 is 30. Use total days when comparing fixed-length terms and keep the original dates when reporting calendar months.
