diff -r f5bbdcb5b148 -r 9c9e64488e54 ndp.lua --- a/ndp.lua Sun Jun 21 22:56:09 2009 +0100 +++ b/ndp.lua Sun Jun 21 22:56:59 2009 +0100 @@ -149,6 +149,11 @@ { lpeg.one_of{"this ", "in the ", "at "} * time_of_day / function (time_of_day) time_of_day = time_of_day:match("%S+$"); + + if time_of_day == "morning" and get_time_part(time, "hour") > time_of_days.morning then + time = time + seconds_in_a.day; -- Morning has passed, so next morning + end + time = adjust_time(time, "hour", time_of_days[time_of_day]); if time_of_day == "noon" or time_of_day == "midnight" then time = adjust_time(time, "min", 00);