readdate.lua

Sun, 21 Jun 2009 17:55:38 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 21 Jun 2009 17:55:38 +0100
changeset 1
29a492373a7c
parent 0
44416491923e
child 3
487f8d7b81b7
permissions
-rw-r--r--

Implement find_next_day_by_name

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

mercurial