This commit is contained in:
Pan
2018-10-29 15:29:54 +08:00
parent aefd8bb36a
commit 51f99770fe
15 changed files with 172 additions and 22 deletions

View File

@@ -36,7 +36,11 @@ export function parseTime(time, cFormat) {
}
export function formatTime(time, option) {
time = +time * 1000
if (('' + time).length === 10) {
time = parseInt(time) * 1000
} else {
time = +time
}
const d = new Date(time)
const now = Date.now()