mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-21 07:26:50 +00:00
feat: add date time util
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { formatDistanceToNow } from "date-fns";
|
||||
|
||||
export function formatTimeAgo(date: Date | string | number) {
|
||||
return formatDistanceToNow(date, {
|
||||
addSuffix: true,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user