getLastMonth static method

DateTime getLastMonth(
  1. DateTime dateTime
)

Get last month from a date.

Implementation

static DateTime getLastMonth(DateTime dateTime) =>
    DateTime(dateTime.year, dateTime.month - 1, dateTime.day);