addWeeks static method
Returns the DateTime resulting from adding the given number of weeks to this DateTime.
The result is computed by incrementing the day parts of this
DateTime by weeks
weeks.
For example: (2020, 12, 31) -> add 1 week -> (2021, 01, 7). (2020, 12, 31) -> add 14 weeks -> (2021, 04, 08).
Implementation
static DateTime addWeeks(DateTime date, int weeks) =>
addDays(date, DateTime.daysPerWeek * weeks);