add method
Add 2 dates
Implementation
Date add(dynamic other) {
if (other is Date) {
return Date(year + other.year, (month) + (other.month), (day) + (other.day));
} else if (other is DateTime) {
return Date(year + other.year, (month) + (other.month), (day) + (other.day));
} else if (other is Duration) {
return Date(year, month, (day) + (other.inDays));
} else if (other is num) {
return Date(year, month, (day) + (other.toInt()));
}
return this;
}