static DateTime? startOfDay(DateTime? dateTime) { if (dateTime == null) return null; return DateTime(dateTime.year, dateTime.month, dateTime.day); }