Fix negative time duration

This commit is contained in:
Rafael 2022-01-05 09:03:40 -03:00 committed by Thomas Zarebczan
parent 9c75378310
commit c96db56f33

View file

@ -57,6 +57,7 @@ export function getTimeAgoStr(date: any, showFutureDate?: boolean, genericSecond
// negative duration === it's a future date from now
if (duration < 0 && showFutureDate) {
str = suffix === 'seconds' ? 'in a few seconds' : 'in %duration% ' + suffix;
duration = duration * -1;
} else if (duration <= 0) {
str = 'Just now';
} else {