DateRange.daysBefore constructor

DateRange.daysBefore(
  1. date date,
  2. int days
)

Creates a DateRange representing the specified number of days before the specified date.

  • date The date to calculate the range from.
  • days The number of days before the specified date.

Implementation

factory DateRange.daysBefore(date date, int days) => DateRange(date.subtract(days.days), date.endOfDay);