Changeset

78:bed3cfce7d60

clix.archive: Parse timestamps
author Kim Alvefur <zash@zash.se>
date Mon, 25 Jun 2012 16:24:59 +0200
parents 77:22be057cf590
children 79:a19ccb8f1ef9
files clix/archive.lua
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/clix/archive.lua	Mon Jun 25 02:41:02 2012 +0200
+++ b/clix/archive.lua	Mon Jun 25 16:24:59 2012 +0200
@@ -1,10 +1,17 @@
 local bare_jid = require"util.jid".bare;
+local parse_datetime = require"util.datetime".parse;
 return function (opts, arg)
 	if opts.short_help then
 		print("Fetch archived messages");
 		return;
 	end
 
+	if opts.start then
+		opts.start = parse_datetime(opts.start);
+	end
+	if opts["end"] then
+		opts["end"] = parse_datetime(opts["end"]);
+	end
 	local selfjid;
 	local function print_message(m)
 		-- TODO Roster lookup