Improve the way dates are parsed