X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/a809e6fc8a079b8db520aebdb5567d7cf55c1559..3abaaf68b0945784e3a8968a733bd7f569e4330e:/src/timetable.lua diff --git a/src/timetable.lua b/src/timetable.lua index 882d8fd..887ee94 100644 --- a/src/timetable.lua +++ b/src/timetable.lua @@ -173,12 +173,17 @@ local function new_timetable ( year , month , day , hour , min , sec ) } end +local function new_from_timestamp ( ts ) + return new_timetable ( 1970 , 1 , 1 , 0 , 0 , ts ) +end + return { doomsday = doomsday ; normalise = normalise ; timestamp = timestamp ; new = new_timetable ; + new_from_timestamp = new_from_timestamp ; cast = cast_timetable ; timetable_mt = timetable_mt ; }