构造函数
方法
参数
- date: Date
可选template: string
返回 string
getCurrentTimestamp
getCurrentTimestamp(): number
getExpiredTimestamp
getExpiredTimestamp(duration?: number): number
isAfterNow
isAfterNow(date: Date): boolean
isBeforeNow
isBeforeNow(date: Date): boolean
时间格式化,默认: 年-月-日 时:分:秒