Skip to content

formatTimeAgoIntlParts

描述

使用 Intl.RelativeTimeFormat 格式化时间,返回部分数组。

示例

ts
import { formatTimeAgoIntlParts } from '@base-web-kits/base-tools-vue';

const parts = formatTimeAgoIntlParts(new Date(Date.now() - 1000));
``` 示例代码

来源

VueUse