Skip to content

Commit

Permalink
removing short from formatDate example
Browse files Browse the repository at this point in the history
  • Loading branch information
bwebs committed Mar 5, 2024
1 parent 1654199 commit c229fad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/react-inbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -634,14 +634,12 @@ Example using [date-fns](https://date-fns.org):
import formatDistanceStrict from "date-fns/formatDistanceStrict";
import { Locale } from "date-fns";
const getTimeAgoShort = (created: string, locale: Locale) => {
const timeAgo = formatDistanceStrict(new Date(created).getTime(), Date.now(), {
const getTimeAgo = (created: string, locale: Locale) => {
return formatDistanceStrict(new Date(created).getTime(), Date.now(), {
addSuffix: true,
roundingMethod: "floor",
locale
})(created);
return timeAgo;
}
---
Expand Down

0 comments on commit c229fad

Please sign in to comment.