Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/lib/libutil



On Thu, Dec 31, 2015 at 04:14:52PM -0500, Greg Troxel wrote:
 > > When evaluated on a Sunday, "next Sunday" means 7 days in the future,
 > > not 14. When evaluated on a Monday, it apparently means 13 days in the
 > > future. There's not exactly a spec for parsedate.y, so conform to the
 > > implementation.
 > >
 > > PR 50574.
 > >
 > > XXX: to me at least this is an odd notion of "next Sunday", but
 > > whatever...
 > 
 > It's clearly a bug.
 > 
 > On a Monday, "next Sunday" is 6 days away.  "Sunday week" is 13.
 > 
 > So perhaps the test should be correct, and the implementation fixed.

Well, it treats "this Sunday" as 6 days away. It apparently thinks
"this X" is in the next seven days and "next X" is the week past that.

That is not entirely crazy, though it's not really consistent with the
conventional usage I know... but that usage isn't well defined. On
Monday, "this Sunday" and "next Sunday" are pretty clearly the same
day; but on Saturday, they probably aren't, and it's not clear what
the crossover is.

Meanwhile, these usages are regional. I've never understood the "next
Sunday week" or "this Sunday week" business no matter how many times I
run across it in lit from across the pond.

Anyhow, if you care, I suggest writing a spec for parsedate }:-)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index