mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
fix(sonarr): [Missing] Air date would show in days for very old content (#538)
This commit is contained in:
@@ -13,8 +13,7 @@ extension DateTimeExtension on DateTime {
|
||||
if (this == null) return 'lunasea.Unknown'.tr();
|
||||
Duration diff = DateTime.now().toLocal().difference(this);
|
||||
if (diff.inSeconds < 10) return 'Just Now';
|
||||
if (diff.inDays >= 1)
|
||||
return '${diff.inDays} ${diff.inDays == 1 ? 'Day' : 'Days'} Ago';
|
||||
if (diff.inDays >= 1) return '${this.lunaDaysDifference} Ago';
|
||||
if (diff.inHours >= 1)
|
||||
return '${diff.inHours} ${diff.inHours == 1 ? 'Hour' : 'Hours'} Ago';
|
||||
if (diff.inMinutes >= 1)
|
||||
|
||||
Reference in New Issue
Block a user