isDate property

bool get isDate

Whether this date and time only contains a date.

A date time is considered to only contain a date when it's in the UTC time zone, and is precisely at midnight (hours, minutes, seconds, and milliseconds are all zero).

Implementation

bool get isDate => isUtc && (millisecondsSinceEpoch % Duration.millisecondsPerDay) == 0;