Improve date handling in EE functions.