Test that invalid date ranges are detected.