- end )
-
- it ( "#normalise handles out of range days in a year" , function ( )
- assert.same({ 2014,1,1,0,0,0 }, { timetable.normalise(2013,1,366,0,0,0) })
- assert.same({ 2014,2,4,0,0,0 }, { timetable.normalise(2013,1,400,0,0,0) })
- assert.same({ 2017,2,3,0,0,0 }, { timetable.normalise(2016,1,400,0,0,0) })
- assert.same({ 2016,3,5,0,0,0 }, { timetable.normalise(2015,1,430,0,0,0) })
- assert.same({ 2017,3,5,0,0,0 }, { timetable.normalise(2016,1,430,0,0,0) })
- assert.same({ 2027,5,18,0,0,0 }, { timetable.normalise(2000,1,10000,0,0,0) })
- assert.same({ 29379,1,25,0,0,0 }, { timetable.normalise(2000,1,10000000,0,0,0) })
- end )
-
- it ( "#normalise handles out of range days in a #month" , function ( )
- assert.same({ 2012,12,1,0,0,0 }, { timetable.normalise(2013,0,1,0,0,0) })
- assert.same({ 2016,6,1,0,0,0 }, { timetable.normalise(2013,42,1,0,0,0) })
+ end)
+
+ it("#normalise handles out of range days in a year", function()
+ assert.same({2014,1,1,0,0,0}, {timetable.normalise(2013,1,366,0,0,0)})
+ assert.same({2014,2,4,0,0,0}, {timetable.normalise(2013,1,400,0,0,0)})
+ assert.same({2017,2,3,0,0,0}, {timetable.normalise(2016,1,400,0,0,0)})
+ assert.same({2016,3,5,0,0,0}, {timetable.normalise(2015,1,430,0,0,0)})
+ assert.same({2017,3,5,0,0,0}, {timetable.normalise(2016,1,430,0,0,0)})
+ assert.same({2027,5,18,0,0,0}, {timetable.normalise(2000,1,10000,0,0,0)})
+ assert.same({29379,1,25,0,0,0}, {timetable.normalise(2000,1,10000000,0,0,0)})
+ end)
+
+ it("#normalise handles out of range days in a #month", function()
+ assert.same({2012,12,1,0,0,0}, {timetable.normalise(2013,0,1,0,0,0)})
+ assert.same({2016,6,1,0,0,0}, {timetable.normalise(2013,42,1,0,0,0)})