diff --git a/apps/admin-x-activitypub/src/utils/get-relative-timestamp.ts b/apps/admin-x-activitypub/src/utils/get-relative-timestamp.ts index be70d68c24..b36554270f 100644 --- a/apps/admin-x-activitypub/src/utils/get-relative-timestamp.ts +++ b/apps/admin-x-activitypub/src/utils/get-relative-timestamp.ts @@ -3,12 +3,12 @@ export const getRelativeTimestamp = (date: Date): string => { const seconds = Math.floor((now.getTime() - date.getTime()) / 1000); let interval = Math.floor(seconds / 31536000); - if (interval > 1) { + if (interval >= 1) { return `${interval}y`; } interval = Math.floor(seconds / 2592000); - if (interval > 1) { + if (interval >= 1) { return `${interval}m`; } @@ -18,12 +18,12 @@ export const getRelativeTimestamp = (date: Date): string => { } interval = Math.floor(seconds / 3600); - if (interval > 1) { + if (interval >= 1) { return `${interval}h`; } interval = Math.floor(seconds / 60); - if (interval > 1) { + if (interval >= 1) { return `${interval}m`; }