Add firstYearOfEra function