Tests of date-based queries