aboutsummaryrefslogtreecommitdiff
path: root/date.lua
blob: 802cac8c2e4985942af69117c1f5edd7f6f15947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---------------------------------------------------
-- Licensed under the GNU General Public License v2
--  * (c) 2009, Adrian C. <anrxc@sysphere.org>
--  * (c) 2008, Lucas de Vries <lucas@glacicle.com>
---------------------------------------------------

-- {{{ 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
local function worker(format)
    return os.date(format or nil)
end
-- }}}

setmetatable(_M, { __call = function(_, ...) return worker(...) end })