Add basic date order function.