lastDayOfWeek property

date get lastDayOfWeek

Returns the last day of the week for the given date.

Implementation

date get lastDayOfWeek => add((DateTime.daysPerWeek - weekday).days);