tweak method longestRecurringCycle.