TF-148 Add data layer for cleanup email cache

This commit is contained in:
dab246
2021-10-21 14:38:48 +07:00
committed by Dat H. Pham
parent 08a9a74de1
commit 00884989d8
9 changed files with 142 additions and 1 deletions
@@ -15,6 +15,12 @@ extension DateTimeExtension on DateTime {
final now = DateTime.now();
return now.year == this.year;
}
int daysBetween(DateTime from) {
from = DateTime(from.year, from.month, from.day);
final to = DateTime(year, month, day);
return (to.difference(from).inHours / 24).round().abs();
}
}
extension DateTimeNullableExtension on DateTime? {