addCalendarDays method
Adds a specified number of days to this DateTime.
Unlike DateTime.add(Duration(days: numberOfDays))
, this adds calendar
days and not 24-hour increments. When possible, it therefore leaves the
time of day unchanged if a DST change would occur during the time
interval. (The returned time can still be different from the original if
it would be invalid for the returned date.)
Implementation
DateTime addCalendarDays(int numberOfDays) =>
copyWith(day: day + numberOfDays);