Calendar dates

Service windows that end on a named date

Handle inclusive service terms, an exclusive expiry boundary and the calendar date that a reader actually sees.

A small service contract may print dates from 7 July to 14 July and an account page may say access expires on the 14th. The words alone do not tell you whether that service remains active through the last date. Start from the actual recorded access rule and resolve whether the end labels a final included date or the first unavailable date.

A month-end export can count a whole month using the first day of the following month as an exclusive end. This avoids missing time values recorded with seconds or subsecond precision near the last date. Retain the actual configured time zone if a timestamp comparison controls access. A civil date calculation can verify the positions before working with the enforcement timestamps.

Use calendar separations to reproduce the main comparisons.

Keep the recorded cutoff with the service period

A careful check uses the instant just before and the instant at the exposed cutoff. If a system grants access until midnight at the beginning of 14 July, its ending date is 14 July and that date is excluded. If it grants access through that named date, the exclusive boundary would normally be the beginning of 15 July in the agreed zone. Check the exact language of the service record.

Check adjacent report windows

The fixture dates make it possible to test cases near month changes and distinguish a date query from an exact-access query.

Recorded exampleFirst settingFirst resultComparison settingComparison result
6 August 2026 through 16 August 2026Count date transitions10 daysCount each civil date including both endpoints11 days
Calendar records for 19 August 2026 and 19 September 2026Inspect 2026-08-19Saturday · 1 August 2026 to Monday · 31 August 2026 · 31 calendar daysInspect 2026-09-19Tuesday · 1 September 2026 to Wednesday · 30 September 2026 · 30 calendar days
4 September 2026 through 9 September 2026Count date transitions5 daysCount each civil date including both endpoints6 days
21 September 2026 through 27 September 2026Count date transitions6 daysCount each civil date including both endpoints7 days
19 October 2026 through 26 October 2026Count date transitions7 daysCount each civil date including both endpoints8 days
Calendar records for 14 November 2026 and 14 December 2026Inspect 2026-11-14Sunday · 1 November 2026 to Monday · 30 November 2026 · 30 calendar daysInspect 2026-12-14Tuesday · 1 December 2026 to Thursday · 31 December 2026 · 31 calendar days
19 December 2026 through 28 December 2026Count date transitions9 daysCount each civil date including both endpoints10 days

Check labels in the interface against the primary event record. Use a dated local conversion before comparing UTC values if the source cut-off belongs to a named zone.

Boundary choices in service records

The following examples compare closed and half-open ranges. The fixture dates make it possible to test cases near month changes and distinguish a date query from an exact-access query.

7 July 2026 through 11 July 2026

The date order is 2026-07-07 followed by 2026-07-11. The calendar span reads 0y 0m 4d and the weeks-and-days row reads 0w 4d.

Applied choiceComputed value
Count date transitions4 days
Count each civil date including both endpoints5 days

The boundary date 7 July 2026 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

If another record starts on 11 July 2026, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

8 July 2026 through 13 July 2026

If another record starts on 13 July 2026, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

Count date transitions. 5 days. Count each civil date including both endpoints. 6 days.

The date order is 2026-07-08 followed by 2026-07-13. The calendar span reads 0y 0m 5d and the weeks-and-days row reads 0w 5d.

The boundary date 8 July 2026 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

13 July 2026 through 19 July 2026

Count date transitions. 6 days. Count each civil date including both endpoints. 7 days.

The boundary date 13 July 2026 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

The date order is 2026-07-13 followed by 2026-07-19. The calendar span reads 0y 0m 6d and the weeks-and-days row reads 0w 6d.

If another record starts on 19 July 2026, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

Calendar records for 16 July 2026 and 16 August 2026

The last Gregorian date is included in a monthly civil roster. If a source records timestamps, the first instant of the next month provides a cleaner exclusive endpoint for filtering events than a hand-written last second of this month.

  • Inspect 2026-07-16 · Wednesday · 1 July 2026 to Friday · 31 July 2026 · 31 calendar days
  • Inspect 2026-08-16 · Saturday · 1 August 2026 to Monday · 31 August 2026 · 31 calendar days

A reporter working from UTC timestamps should determine the desired local civil date first. A midnight rollover in the reporting zone can change the calendar key even though the original event instant remains fixed.

The source anchors are 2026-07-16 and 2026-08-16. Preserve the calendar or reporting convention alongside these whole dates before deriving the label.

21 July 2026 through 29 July 2026

The date order is 2026-07-21 followed by 2026-07-29. The calendar span reads 0y 0m 8d and the weeks-and-days row reads 1w 1d.

Applied choiceComputed value
Count date transitions8 days
Count each civil date including both endpoints9 days

The boundary date 21 July 2026 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

If another record starts on 29 July 2026, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

29 July 2026 through 7 August 2026

If another record starts on 7 August 2026, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

Count date transitions. 9 days. Count each civil date including both endpoints. 10 days.

The date order is 2026-07-29 followed by 2026-08-07. The calendar span reads 0y 0m 9d and the weeks-and-days row reads 1w 2d.

The boundary date 29 July 2026 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

Pros and cons of the approach

Pros. A half-open interval lets adjacent access periods share a boundary without either overlap or a gap when they use the same interpretation.

Cons. A written end date can be understood as inclusive by a human reader. A timestamp export may use an alternate zone or a separate cut-off hour.

Store both the contractual label and the implemented exclusive end when comparing a dated service with its account display.

What belongs in the final record

Check labels in the interface against the primary event record. Use a dated local conversion before comparing UTC values if the source cut-off belongs to a named zone.

24 January 2027 through 3 February 2027

The date order is 2027-01-24 followed by 2027-02-03. The calendar span reads 0y 0m 10d and the weeks-and-days row reads 1w 3d.

Applied choiceComputed value
Count date transitions10 days
Count each civil date including both endpoints11 days

The boundary date 24 January 2027 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

If another record starts on 3 February 2027, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

10 March 2027 through 14 March 2027

If another record starts on 14 March 2027, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

Count date transitions. 4 days. Count each civil date including both endpoints. 5 days.

The date order is 2027-03-10 followed by 2027-03-14. The calendar span reads 0y 0m 4d and the weeks-and-days row reads 0w 4d.

The boundary date 10 March 2027 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

Calendar records for 4 May 2027 and 4 June 2027

The last Gregorian date is included in a monthly civil roster. If a source records timestamps, the first instant of the next month provides a cleaner exclusive endpoint for filtering events than a hand-written last second of this month.

  • Inspect 2027-05-04 · Saturday · 1 May 2027 to Monday · 31 May 2027 · 31 calendar days
  • Inspect 2027-06-04 · Tuesday · 1 June 2027 to Wednesday · 30 June 2027 · 30 calendar days

A reporter working from UTC timestamps should determine the desired local civil date first. A midnight rollover in the reporting zone can change the calendar key even though the original event instant remains fixed.

The source anchors are 2027-05-04 and 2027-06-04. Preserve the calendar or reporting convention alongside these whole dates before deriving the label.

28 May 2027 through 3 June 2027

The date order is 2027-05-28 followed by 2027-06-03. The calendar span reads 0y 0m 6d and the weeks-and-days row reads 0w 6d.

Applied choiceComputed value
Count date transitions6 days
Count each civil date including both endpoints7 days

The boundary date 28 May 2027 contributes zero transitions before any move. Advance one for each date reached. The closed list contains the starting position as well as the reached dates, so its total is one greater for this forward interval.

If another record starts on 3 June 2027, decide which period owns that shared boundary before adding the totals. Either count it in one disjoint period or carry the overlap as a documented adjustment.

Questions readers may need to resolve

Does an end date always mean midnight?

Confirm the actual cutoff. Some services close at a stated local time and some use an exclusive midnight. The written date alone is insufficient.

Can I display a final included date from an exclusive end?

If the exclusive boundary is the first instant of a civil date, the preceding date is the last fully included date. Verify the reporting zone first.

Why is a full month easier with the next month’s start?

An exclusive filter at the next month’s first instant can retain all events of the preceding month, including subsecond values on its final date.

Does a one-day service use two civil date boundaries?

It can begin with one local midnight and end at the next. The covered date list can contain one date while the boundary interval measures the full day.

What if an expiry falls on a holiday?

Check the actual terms and service schedule. A holiday may matter to staffed support even if automated availability follows the original timestamp.

Do I need a time zone for pure dates?

A date-only difference is independent of offsets. Establish a zone when deciding which civil date contains an actual instant or which midnight controls the agreement.

Why keep the raw timestamp?

It establishes exactly when the service ended, even when a dashboard renders that event in the viewer’s own local date.

How can I audit a window quickly?

Check the lowest and highest accepted timestamps, then verify whether the first unavailable instant matches the recorded boundary policy.

Explore the other Daylooply articles →