dateOnly static method
Returns a DateTime with the date of the original, but time set to midnight.
Implementation
static DateTime dateOnly(DateTime date) {
final DateTime now = DateTime.now();
return DateTime.utc(now.year, now.month, now.day);
}