Only match date and time to the given precision.

A date query of "2007" should succeed for all dates in 2007.