firstDayOfMonth static method

DateTime firstDayOfMonth(
  1. DateTime date
)

Returns the first day of the month containing date.

Implementation

static DateTime firstDayOfMonth(DateTime date) {
  return DateTime(date.year, date.month, 1);
}