dateOnlyEng function
Returns the date of a DateTime object without the time component.
date is the DateTime object to format.
Returns a new DateTime object with the same date as the input but with the time component set to 00:00:00.
Implementation
DateTime dateOnlyEng(DateTime date) {
return DateTime(date.year, date.month, date.day);
}