-Fixed off-by-one errors for date parsing.

#992