Skip to content

多久以前 timeAgo

多久以前


 
属性名说明类型必填默认值
timestamp时间戳Number-
option配置项Object-
option.open自定义Boolean-
option.cb回调Function-
interface TimeUnits {
seconds: number;
minutes: number;
hours: number;
days: number;
months: number;
years: number;
}
interface Options {
open:boolean,
cb:(e:TimeUnits) => string
}

返回值