Remove use of Math.floorDiv (input not negative).
Change getLeapYearsBefore to 'reverse' 99 occurrences.
Correct getLeapMonthsBefore(...)