isToday method
is today. 是否是当天.
Implementation
bool isToday({bool isUtc = false, int? locMs}) {
final DateTime old = toDatetime(isUtc: isUtc);
DateTime now;
if (locMs != null) {
now = DateTime.fromMillisecondsSinceEpoch(locMs, isUtc: isUtc);
} else {
now = isUtc ? DateTime.now().toUtc() : DateTime.now().toLocal();
}
return old.year == now.year && old.month == now.month && old.day == now.day;
}