End date of month calculation was all messed up