Exclusive end dates

Plain Dates defaults to a half-open range written [start, end). The start date is included and the end date is excluded. January 1 to January 11 is therefore 10 days.

This convention is useful for joining consecutive ranges because the shared boundary is not counted twice. It is also how an all-day event end is represented in ICS files.

Inclusive end dates

When both selected dates should count, include the end date. January 1 through January 11 inclusive contains 11 calendar dates.

The choice must apply to every statistic, not just the headline. Total days, full weeks, weekdays, weekend days, and the years-months-days breakdown all need the same effective endpoint.

Choose the rule from the real task

A vacation covering both arrival and departure dates may be described inclusively, while the number of nights between hotel check-in and check-out is usually exclusive of checkout day. Legal and administrative deadlines can define their own rules, so follow the governing instructions.

Related calculators