lastDayOfMonth static method
Returns DateTime that represents a beginning
of the last day of the month containing date
.
Example: (2020, 4, 9, 15, 16) -> (2020, 4, 30, 0, 0, 0, 0).
Implementation
static DateTime lastDayOfMonth(DateTime dateTime) {
return previousDay(firstDayOfNextMonth(dateTime));
}