9 lines
260 B
Dart
9 lines
260 B
Dart
extension IsSameDay on DateTime {
|
|
bool isSameDay(DateTime other) {
|
|
return year == other.year && month == other.month && day == other.day;
|
|
}
|
|
|
|
DateTime nextWeekday(int day) {
|
|
return add(Duration(days: (day - weekday) % DateTime.daysPerWeek));
|
|
}
|
|
} |