We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1654199 commit c229fadCopy full SHA for c229fad
packages/react-inbox/README.md
@@ -634,14 +634,12 @@ Example using [date-fns](https://date-fns.org):
634
import formatDistanceStrict from "date-fns/formatDistanceStrict";
635
import { Locale } from "date-fns";
636
637
-const getTimeAgoShort = (created: string, locale: Locale) => {
638
- const timeAgo = formatDistanceStrict(new Date(created).getTime(), Date.now(), {
+const getTimeAgo = (created: string, locale: Locale) => {
+ return formatDistanceStrict(new Date(created).getTime(), Date.now(), {
639
addSuffix: true,
640
roundingMethod: "floor",
641
locale
642
})(created);
643
-
644
- return timeAgo;
645
}
646
647
---
0 commit comments