startOfMonth property

DateTime get startOfMonth

Get the start of the month

Example:

final date = DateTime(2023, 12, 25);
print(date.startOfMonth); // 2023-12-01 00:00:00.000

Implementation

DateTime get startOfMonth => DateTime(year, month, 1);