--- a/mcbot/cmds/tvcal.lua Sun Apr 18 23:51:22 2010 +0200
+++ b/mcbot/cmds/tvcal.lua Mon Apr 19 00:31:05 2010 +0200
@@ -60,7 +60,7 @@
local function tvcal_by_date (d)
if not tvcaldata[d] then
- return "No episode found for this date"
+ return "No episode found for this date ("..d..")"
end
local r = "Shows on " .. d .. ":\n"
@@ -106,6 +106,11 @@
arg = os.date("%F")
elseif arg == "tomorrow" then
arg = os.date("%F", os.date("%s")+86400)
+ elseif arg:match("^%+%d+$") then
+ local n = tonumber(arg:match("^%+(%d+)$"))
+ if n < 60 then
+ arg = os.date("%F", os.date("%s")+86400*n)
+ end
end
if arg:match("^%d%d%d%d%-%d%d%-%d%d$") then