Simplified and shared logic for completePeriodsIds