Fixed date-start and date-end comparisons

The logic was comparing strings to numbers for equality, and therefor always returning false.