date dividing bug fixed
This commit is contained in:
parent
c0c31e16e4
commit
2133544b56
|
|
@ -40,9 +40,12 @@ class Utils {
|
|||
// }
|
||||
|
||||
static String formatDateDifference(DateTime date) {
|
||||
final now = DateTime.now();
|
||||
final now = DateTime.now().toLocal();
|
||||
final difference = now.difference(date).inDays;
|
||||
|
||||
if (difference == 0 && now.day != date.day) {
|
||||
return 'yesterday'.tr;
|
||||
}
|
||||
if (difference == 0) {
|
||||
return 'today'.tr;
|
||||
} else if (difference == 1) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user