Implement correct handling for cases where the latest hour is earlier
than the earliest hour (i.e, the user is searching for an hour range
that spans midnight).