Function to turn years into multiple time periods