Improvements to the Date class logic.