formatDateToTimeStamp(time
): number
获取指定时间的Unix时间戳
Name | Type | Description |
---|---|---|
time |
string |
时间字符串,支持格式: - 20160126 12:00:00 - 2016-01-26 12:00:00 - 2016.01.26 12:00:00 - 20160126 - 2016-01-26 12:00:00.0 |
number
Unix时间戳(毫秒数)
Description
将各种格式的日期字符串转换为Unix时间戳(毫秒数)
Throws
当输入参数不是字符串时抛出
Throws
当日期格式无效时抛出
Example