aboutsummaryrefslogtreecommitdiff
path: root/src/components/DateString/compactDateString.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/DateString/compactDateString.ts')
-rw-r--r--src/components/DateString/compactDateString.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/DateString/compactDateString.ts b/src/components/DateString/compactDateString.ts
index dffd912..f067b1a 100644
--- a/src/components/DateString/compactDateString.ts
+++ b/src/components/DateString/compactDateString.ts
@@ -28,6 +28,7 @@ const resolve = (value: number, metricIndex = 0): string => {
const compactDateString = (date: Date): string => {
const now = new Date();
const diff = (now.valueOf() - date.valueOf()) / 1000;
+ if (diff < 60) return 'just now';
return resolve(diff);
};