getdate.y: disallow countable dayshifts like "4 yesterday ago"
authorOndřej Vašík <ovasik@redhat.com>
Fri, 26 Sep 2008 13:28:49 +0000 (15:28 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 29 Sep 2008 21:24:06 +0000 (23:24 +0200)
commit929a85498c0c5657499db769f36c739d28467c8f
tree34112e2016f0631c291b62e1f546a2ffd5d55d77
parentd68f1f046198fe78fb4274377e9bc1ae3b4bccc8
getdate.y: disallow countable dayshifts like "4 yesterday ago"

* lib/getdate.y (relative_time_table) [tDAY_SHIFT]: New type for
exactly specified dayshifts.
(dayshift): New rule.
(rel): Add dayshift.
(relative_time_table) [tomorrow, yesterday, today, now]:
Use tDAY_SHIFT in place of tDAY_UNIT.
* tests/test-getdate.c: Add tests for now-disallowed countable
dayshifts, e.g., "4 yesterday ago".
ChangeLog
lib/getdate.y
tests/test-getdate.c