kgetDateByDayOffset method

DateTime kgetDateByDayOffset({
  1. int offset = 0,
})

获取指定天数的日期,0=当前日期,1=当前日期后一天,-1=当前日期前一天

Implementation

DateTime kgetDateByDayOffset({int offset = 0}) {
  return DateTime.fromMillisecondsSinceEpoch(
    millisecondsSinceEpoch + offset * oneDay,
  );
}