Improve date functions
Avoid unnecessary self-updates