Fixed bug in parser

Dates are no longer valid if endDate > startDate