getStartDateTimeOfToDay static method

DateTime getStartDateTimeOfToDay({
  1. int ofDay = 0,
})

获取几天前ofDay的开始时间

ofDay 0 = 当天

Returns DateTime

Implementation

static DateTime getStartDateTimeOfToDay({int ofDay = 0}) {
  var now = DateTime.now();
  return DateTime(now.year, now.month, now.day + ofDay, 0, 0, 0, 0, 0);
}