improved date ordering filter