Refactors calc of nextFirstDay.