findFirstDateOfTheMonth method

DateTime findFirstDateOfTheMonth(
  1. DateTime dateTime
)

Find the first date of the month which contains the provided date.

Implementation

DateTime findFirstDateOfTheMonth(DateTime dateTime) {
  DateTime firstDayOfMonth = DateTime.utc(dateTime.year, dateTime.month, 1);
  print('firstDayOfMonth - $firstDayOfMonth');
  return firstDayOfMonth;
}