isToday method

bool isToday([
  1. DateTime? now
])

是否是今天 now - 当前时间,默认DateTime.now()

Implementation

bool isToday([DateTime? now]) {
  now ??= DateTime.now();
  return now.day == day && now.month == month && now.year == year;
}