Extracted years logic into helper