ChiperSoft/Kalendae — pull request #96 by roryf (2013-07-09 15:59:35+00:00)
Title: Fixes next and previous buttons not showing correctly

Setting computer time to 1st of the month in the am (month did not appear to matter) caused an off-by-one error in the calculation to show next and previous buttons. This was due to incorrect normalisation of date to midday and incorrect addition/subtraction when doing a comparison.

This fix ensures dates being compared are exactly midday and removes unnecessary modifying of month (it was actually modifying minutes rather than months, further adding to the problem).