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;
}