Skip to content

Commit

Permalink
regression: Show correct date for last day time (#30407)
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal committed Sep 18, 2023
1 parent e554607 commit 614a9b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/heavy-zebras-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Show correct date for last day time
2 changes: 1 addition & 1 deletion apps/meteor/client/hooks/useTimeAgo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const useTimeAgo = (): ((time: Date | number | string) => string) => {
(time) => {
return moment(time).calendar(null, {
sameDay: format,
lastDay: moment().calendar('lastDay').replace('LT', format),
lastDay: moment(time).calendar('lastDay').replace('LT', format),
lastWeek: `dddd ${format}`,
sameElse: 'LL',
});
Expand Down

0 comments on commit 614a9b8

Please sign in to comment.