currentMonth static method

DateTimeRange<DateTime> currentMonth()

Returns a DateTimeRange covering the whole current month.

Implementation

static DateTimeRange currentMonth() {
  final DateTime now = DateTime.now();
  final DateTime first = DateTime(now.year, now.month);
  final DateTime last =
      DateTime(now.year, now.month, daysInMonth(now.year, now.month));
  return DateTimeRange(start: first, end: last);
}