isAfter method
returns true if first is after second
Implementation
bool isAfter(
DateTime first,
DateTime second, {
bool needDayComparison = true,
}) {
return first.year > second.year ||
(first.year == second.year && first.month > second.month) ||
(needDayComparison &&
(first.year == second.year &&
first.month == second.month &&
first.day > second.day));
}