kisYesterday method
根据时间判断是否是昨天
Implementation
bool kisYesterday() {
var file = this;
var now = DateTime.now();
if (file.year == now.year) {
int spDay = now.kgetDayOfYear() - file.kgetDayOfYear();
return spDay == 1;
} else {
return ((now.year - file.year == 1) &&
file.month == 12 &&
now.month == 1 &&
file.day == 31 &&
now.day == 1);
}
}