Changed year_frac() flow; exception handling