Fix: create time (#1250)

* change date strings

* remove additional suffix

* fix tests

---------

Co-authored-by: corentin <corentin@twenty.com>
This commit is contained in:
Sunil Kumar Behera
2023-08-23 12:18:30 +05:30
committed by GitHub
parent 2e01efb8f3
commit 587c74667c
4 changed files with 6 additions and 6 deletions

View File

@ -61,7 +61,9 @@ export function beautifyPastDateRelativeToNow(
try {
const parsedDate = parseDate(pastDate);
return formatDistanceToNow(parsedDate.toJSDate());
return formatDistanceToNow(parsedDate.toJSDate(), {
addSuffix: true,
}).replace('less than a minute ago', 'now');
} catch (error) {
logError(error);
return '';