I'd use datetime
and parse it out normally. Then I'd use datetime.datetime.replace
on the object if it is past your ceiling date -- Adjusting it back 100 yrs.:
import datetime
dd = datetime.datetime.strptime(date,'%y%m%d')
if dd.year > 2005:
dd = dd.replace(year=dd.year-100)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…