lastDayOfMonth property

DateTime lastDayOfMonth

Returns the last day of this month (considers leap years)

Implementation

DateTime get lastDayOfMonth => isUtc ? DateTime.utc(year, month + 1, 0) : DateTime(year, month + 1, 0);