X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/30d7af10d208006ea09f32bd006c2cb2556a36ac..2d6b75a796ed12acc8aecf427d2eda1ba9b53b7d:/luatz/init.lua diff --git a/luatz/init.lua b/luatz/init.lua index 2ad2ae8..2660715 100644 --- a/luatz/init.lua +++ b/luatz/init.lua @@ -1,13 +1,18 @@ -local get_tz = require "luatz.tzcache".get_tz +local _M = { + parse = require "luatz.parse" ; + strftime = require "luatz.strftime" ; + timetable = require "luatz.timetable" ; +} + +--- Top-level aliases for common functions + +_M.time = require "luatz.gettime".gettime +_M.get_tz = require "luatz.tzcache".get_tz -local function gettimein ( tz , now ) - return get_tz ( tz ):localize ( now ) +--- Handy functions + +_M.time_in = function ( tz , now ) + return _M.get_tz ( tz ):localize ( now ) end -return { - get_tz = get_tz ; - gettime = require "luatz.gettime".gettime ; - gettimein = gettimein ; - parse = require "luatz.parse" ; - timetable = require "luatz.timetable" ; -} +return _M