lastDayOfMonth static method

DateTime lastDayOfMonth(
  1. DateTime date
)

Returns the last day of the month containing date.

Implementation

static DateTime lastDayOfMonth(DateTime date) {
  return DateTime(date.year, date.month + 1, 0);
}