diff --git a/nise-frontend/src/app/view-user/view-user.component.ts b/nise-frontend/src/app/view-user/view-user.component.ts index eebf169..153e547 100644 --- a/nise-frontend/src/app/view-user/view-user.component.ts +++ b/nise-frontend/src/app/view-user/view-user.component.ts @@ -132,14 +132,14 @@ export class ViewUserComponent implements OnInit, OnChanges, OnDestroy { return "???"; } - const difference = Math.abs(differenceInHours(now, inputDate)); // Use absolute value + const difference = Math.abs(differenceInHours(now, inputDate)); if (difference < 1) { return "recently"; } else if (difference < 24) { return `${difference}h ago`; } else { - const days = differenceInDays(now, inputDate); + const days = Math.abs(differenceInDays(now, inputDate)); const hours = difference % 24; return `${days}d ${hours}h ago`; }