OhMyBug

logic/correctness

Inclusive versus exclusive end confused

#9rare13 sightingsfirst seen August 2026

What goes wrong

A range end that the code treats as exclusive (up to but not including, like '< 1 Feb') is displayed, validated or converted as if it were inclusive (through 31 Jan), or the other way round. The last day, hour or slot is counted twice or lost.

Example

The date filter reads 'to 31 Dec' but the query asks only for orders created before 31 Dec, so orders from New Year's Eve vanish from the annual report.

Not to be confused with

About which side of the boundary belongs to the range; not timezone choice, date parsing or rounding.

Discovered by

Field notes · 4