roundToFirstDayOfMonth static method

DateTime roundToFirstDayOfMonth(
  1. DateTime date
)

Rounds the given DateTime to the first day of the month.

Implementation

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