roundToLastDayOfMonth static method
Rounds the given DateTime to the last day of the month.
Implementation
static DateTime roundToLastDayOfMonth(DateTime date) {
final daysInMonth = getDaysCountInMonth(date.year, date.month);
return DateTime(date.year, date.month, daysInMonth);
}