Fix bug: Less precise dates are always before more precise dates, and same with max