Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Petit authored and Kevin Petit committed May 16, 2020
1 parent b50b8e5 commit 14b4038
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions frontend/src/mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
Expand All @@ -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)
},
Expand Down Expand Up @@ -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))
},
Expand Down

0 comments on commit 14b4038

Please sign in to comment.