From: daurnimator Date: Tue, 23 Jul 2013 22:53:47 +0000 (-0400) Subject: src/timetable: Add equality metamethod X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/e0dbd486c7005f901811529ef5b82f5bd95211ea?hp=c21d0650957336fab335228413fa3a53ee4cc338 src/timetable: Add equality metamethod --- diff --git a/src/timetable.lua b/src/timetable.lua index 5fa7205..9b78576 100644 --- a/src/timetable.lua +++ b/src/timetable.lua @@ -136,6 +136,9 @@ end local timetable_mt = { __index = timetable_methods ; + __eq = function ( a , b ) + return a:timestamp() < b:timestamp() + end ; } local function cast_timetable ( tm )