vicious/date.lua

24 lines
598 B
Lua
Raw Normal View History

2009-09-29 22:33:19 +02:00
---------------------------------------------------
-- Licensed under the GNU General Public License v2
-- * (c) 2009, Adrian C. <anrxc.sysphere.org>
-- * (c) Wicked, Lucas de Vries
---------------------------------------------------
-- {{{ Grab environment
local os = { date = os.date }
local setmetatable = setmetatable
-- }}}
-- Date: provides access to os.date with optional custom formatting
module("vicious.date")
-- {{{ Date widget type
2009-08-07 17:41:10 +02:00
local function worker(format)
2009-10-04 00:06:05 +02:00
return os.date(format or nil)
end
-- }}}
setmetatable(_M, { __call = function(_, ...) return worker(...) end })