Allow the nearest time to be queried as "before" or "nearest"