mirror of https://github.com/statping/statping
Reformat code
parent
b50b8e50d1
commit
14b4038572
|
@ -19,26 +19,26 @@ export default Vue.mixin({
|
|||
startToday() {
|
||||
return startOfToday()
|
||||
},
|
||||
secondsHumanize (val) {
|
||||
const t2 = addSeconds(new Date(0), val)
|
||||
if (val >= 60) {
|
||||
let minword = "minute"
|
||||
if (val >= 120) {
|
||||
minword = "minutes"
|
||||
}
|
||||
return format(t2, "m '"+minword+"' s 'seconds'")
|
||||
}
|
||||
return format(t2, "s 'seconds'")
|
||||
},
|
||||
secondsHumanize (val) {
|
||||
const t2 = addSeconds(new Date(0), val)
|
||||
if (val >= 60) {
|
||||
let minword = "minute"
|
||||
if (val >= 120) {
|
||||
minword = "minutes"
|
||||
}
|
||||
return format(t2, "m '"+minword+"' s 'seconds'")
|
||||
}
|
||||
return format(t2, "s 'seconds'")
|
||||
},
|
||||
utc(val) {
|
||||
return new Date.UTC(val)
|
||||
},
|
||||
ago(t1) {
|
||||
return formatDistanceToNow(parseISO(t1))
|
||||
},
|
||||
daysInMonth(t1) {
|
||||
return lastDayOfMonth(t1)
|
||||
},
|
||||
daysInMonth(t1) {
|
||||
return lastDayOfMonth(t1)
|
||||
},
|
||||
nowSubtract(seconds) {
|
||||
return subSeconds(new Date(), seconds)
|
||||
},
|
||||
|
@ -51,9 +51,9 @@ export default Vue.mixin({
|
|||
niceDate(val) {
|
||||
return format(parseISO(val), "EEEE, MMM do h:mma")
|
||||
},
|
||||
parseISO(v) {
|
||||
return parseISO(v)
|
||||
},
|
||||
parseISO(v) {
|
||||
return parseISO(v)
|
||||
},
|
||||
toUnix(val) {
|
||||
return getUnixTime(val)
|
||||
},
|
||||
|
@ -152,12 +152,12 @@ export default Vue.mixin({
|
|||
})
|
||||
return {data: newSet}
|
||||
},
|
||||
humanTime(val) {
|
||||
if (val >= 10000) {
|
||||
return Math.floor(val / 10000) + "ms"
|
||||
}
|
||||
return Math.floor(val / 1000) + "μs"
|
||||
},
|
||||
humanTime(val) {
|
||||
if (val >= 10000) {
|
||||
return Math.floor(val / 10000) + "ms"
|
||||
}
|
||||
return Math.floor(val / 1000) + "μs"
|
||||
},
|
||||
lastDayOfMonth(month) {
|
||||
return new Date(Date.UTC(new Date().getUTCFullYear(), month + 1, 0))
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue