Several small fixes to date management logic. Use single date when max and min are equal.