removeMinutes property

DateTime get removeMinutes

Returns DateTime object without minute and smaller.

New instance will have anything smaller than hour as 0.

  final dateOnly = DateTime.now();  // 16-09-2023 16:44:26:234567Z
  dateOnly.onlyDate;                // 16-09-2023 16:00:00:000000Z

Implementation

DateTime get removeMinutes => DateTime(year, month, day, hour);