aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2010-10-03 18:48:02 +0200
committerAdrian C. (anrxc) <anrxc@sysphere.org>2010-10-03 18:48:02 +0200
commitc6085eef0648f54e1c70c92c544a89d9bb3d22c2 (patch)
tree2b15fa1ae18ae11bee2eec16cd64eae0a3ba8377 /widgets
parenta9d6ea21e62ac612a18fd5f9463fccf739d2f239 (diff)
downloadvicious-legacy-c6085eef0648f54e1c70c92c544a89d9bb3d22c2.tar.xz
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
Diffstat (limited to 'widgets')
-rw-r--r--widgets/date.lua6
1 files changed, 3 insertions, 3 deletions
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
-- }}}