readdate.lua@bb0892bc9687
readdate.lua
Sun, 21 Jun 2009 18:00:07 +0100
- author
- Matthew Wild <mwild1@gmail.com>
- date
- Sun, 21 Jun 2009 18:00:07 +0100
- changeset 2
- bb0892bc9687
- parent 0
-
44416491923e
- child 3
-
487f8d7b81b7
- permissions
- -rw-r--r--
Add tests for days of the week
local ndp = require "ndp";
local base;
for line in io.lines() do
if line:match("^base:%d+$") then
base = tonumber(line:match("^base:(%d+)$"));
else
local ret = ndp.when(line, 0, base);
print(os.date("%c", ret).." ("..ret..")");
end
end