# HG changeset patch # User Matthew Wild # Date 1245630077 -3600 # Node ID 309073a2bb530e892d4f530b1ae1519c4366e82f # Parent caf8bbcbaf0712769cf7da52c15c8502c0649622 Support for 'today' and 'the day after' diff -r caf8bbcbaf07 -r 309073a2bb53 ndp.lua --- a/ndp.lua Mon Jun 22 01:16:01 2009 +0100 +++ b/ndp.lua Mon Jun 22 01:21:17 2009 +0100 @@ -127,10 +127,15 @@ local patterns = { + { Pi"today" }; { Pi"tomorrow" / function () time = time + seconds_in_a.day; end }; + { (lpeg.one_of{"a ", "the "}+true) * Pi"day after" / + function () + time = time + seconds_in_a.day; + end }; { Pi"next week" / function () time = time + seconds_in_a.week;