isToday function

bool isToday(
  1. String str
)

Returns true if str represents today's UTC date.

Implementation

bool isToday(String str) {
  final date = tryParseDate(str);
  if (date == null) return false;
  final now = DateTime.now().toUtc();
  return date.year == now.year &&
      date.month == now.month &&
      date.day == now.day;
}