X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/648bc6a577e5191fc2d2842cbc1c2dce368452bc..cf0cc951c06f50ff9390eca662f13d4887c83114:/src/timetable.lua?ds=inline diff --git a/src/timetable.lua b/src/timetable.lua index 81fcbf8..df78b15 100644 --- a/src/timetable.lua +++ b/src/timetable.lua @@ -111,8 +111,29 @@ local function normalise ( tm ) return tm end +local timetable_mt = { +} + +local function cast_timetable ( tm ) + return setmetatable ( tm , timetable_mt ) +end + +local function new_timetable ( year , month , day , hour , min , sec ) + return cast_timetable { + year = year ; + month = month ; + day = day ; + hour = hour ; + min = min ; + sec = sec ; + } +end return { doomsday = doomsday ; normalise = normalise ; + + new = new_timetable ; + cast = cast_timetable ; + timetable_mt = timetable_mt ; }