made the processing of $date consistent within index.xql