refactor addLeapDaysR, add equals function