Updated the way dates are parsed