From c6085eef0648f54e1c70c92c544a89d9bb3d22c2 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 3 Oct 2010 18:48:02 +0200 Subject: date: accept time as a widget argument Format custom time for example to calculate time zone differences, New York time relative to me would be widget argument: os.time()-21600 --- widgets/date.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'widgets') diff --git a/widgets/date.lua b/widgets/date.lua index 68a803d..b20e43f 100644 --- a/widgets/date.lua +++ b/widgets/date.lua @@ -10,13 +10,13 @@ local setmetatable = setmetatable -- }}} --- Date: provides access to os.date with optional custom formatting +-- Date: provides access to os.date with optional time formatting module("vicious.widgets.date") -- {{{ Date widget type -local function worker(format) - return os.date(format or nil) +local function worker(format, warg) + return os.date(format or nil, warg or nil) end -- }}} -- cgit v1.2.3