On Wed, Feb 25, 2009 at 07:03:27PM +1300, Martin D Kealey wrote: : On Wed, 25 Feb 2009, I wrote: : > $y + ±5 # same as ($y - 5) | ($y + 5) (also same as $y - ±5) : > $y ± 5 # same as ($y - 5) .. ($y + 5)
That seems a little cheesy to me. : A further question: should such ranges be [closed], (open) or [half-open)? : : I would argue for half-open because then exactly one of a set of consecutive : ranges will match; back to the original question, I'd only expect one match : from: : : $time ~~ $date-yesterday : $time ~~ $date-today : $time ~~ $date-tomorrow : : even if $time falls precisely on midnight. Half-open, certainly, so really same as ($y - 5) ..^ ($y + 5). Larry