diff options
Diffstat (limited to 'date.lua')
-rw-r--r-- | date.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/date.lua b/date.lua new file mode 100644 index 0000000..e6ea108 --- /dev/null +++ b/date.lua @@ -0,0 +1,24 @@ +---------------------------------------------------------- +-- Licensed under the GNU General Public License version 2 +-- * Copyright (C) 2009 Adrian C. <anrxc_sysphere_org> +---------------------------------------------------------- + +-- {{{ Grab environment +local os = { date = os.date } +-- }}} + + +-- Date: provides access to os.date with optional custom formatting +module("vicious.date") + + +-- {{{ Date widget type +function worker(format) + -- Get format + if format == nil then + return os.date() + else + return os.date(format) + end +end +-- }}} |