Improve date management