Fix future date string (#637)
This commit is contained in:
parent
bc38466abf
commit
0a986b1603
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ export function getTimeAgoStr(date: any, showFutureDate?: boolean, genericSecond
|
||||||
});
|
});
|
||||||
|
|
||||||
// Strip off the ending 's' for the singular suffix
|
// Strip off the ending 's' for the singular suffix
|
||||||
if (duration === 1) suffix = suffix.replace(/s$/g, '');
|
if (duration === 1 || (duration === -1 && showFutureDate)) suffix = suffix.replace(/s$/g, '');
|
||||||
|
|
||||||
// negative duration === it's a future date from now
|
// negative duration === it's a future date from now
|
||||||
if (duration < 0 && showFutureDate) {
|
if (duration < 0 && showFutureDate) {
|
||||||
|
|
Loading…
Reference in a new issue