Skip to content

时间工具

提供时间相关工具:格式化时间戳。

导入

ts
import { formatTimestamp } from '@quiteer/utils'

API 与示例

formatTimestamp(date)

ts
// 函数:格式化时间戳
// 作用:返回 YYYY-MM-DD HH:mm:ss 格式的本地时间字符串
formatTimestamp(new Date()) // => '2025-11-24 17:20:00'(示例)

Released under the MIT License.