Fix: take into account if start-date <= end-date or not. Otherwise check is wrong, and no valid year period is returned.