isToday static method
is today.
Implementation
static bool isToday(int? milliseconds, {bool isUtc = false, int? locMs}) {
if (milliseconds == null || milliseconds == 0) return false;
DateTime old =
DateTime.fromMillisecondsSinceEpoch(milliseconds, isUtc: isUtc);
DateTime now;
if (locMs != null) {
now = DateUtil.getDateTimeByMs(locMs);
} else {
now = isUtc ? DateTime.now().toUtc() : DateTime.now().toLocal();
}
return old.year == now.year && old.month == now.month && old.day == now.day;
}