From: daurnimator Date: Tue, 6 Aug 2013 00:39:54 +0000 (-0400) Subject: src/timetable: Multiplication is left associative, add brackets so that constants... X-Git-Url: https://git.madduck.net/etc/awesome.git/commitdiff_plain/552dae748576124266ac25f05a5d9b1d142cd69c?ds=sidebyside src/timetable: Multiplication is left associative, add brackets so that constants can be folded --- diff --git a/src/timetable.lua b/src/timetable.lua index 1ce701c..bacc58c 100644 --- a/src/timetable.lua +++ b/src/timetable.lua @@ -112,7 +112,7 @@ local function timestamp ( year , month , day , hour , min , sec ) -- Each leap year adds one day + ( leap_years_since ( year - 1 ) - leap_years_since_1970 ) - 1 - return days_since_epoch * 60*60*24 + return days_since_epoch * (60*60*24) + hour * (60*60) + min * 60 + sec