|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* Created by jiachenpan on 16/11/18.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export function parseTime(time, cFormat) {
|
|
|
|
|
export function parseTime(time, cFormat) {
|
|
|
|
|
if (arguments.length === 0) {
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
@ -32,9 +32,9 @@
|
|
|
|
|
return value || 0
|
|
|
|
|
})
|
|
|
|
|
return time_str
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function formatTime(time, option) {
|
|
|
|
|
export function formatTime(time, option) {
|
|
|
|
|
time = +time * 1000
|
|
|
|
|
const d = new Date(time)
|
|
|
|
|
const now = Date.now()
|
|
|
|
@ -55,4 +55,4 @@
|
|
|
|
|
} else {
|
|
|
|
|
return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|