Skip to content

Commit

Permalink
npx standard fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k4mien committed Jan 27, 2024
1 parent 2aee858 commit 78d3552
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/commands/forward.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { EmbedBuilder } = require('discord.js')
const formatMSHHMMSS = require('../utils/time')
const formatMSHHMMSS = require('../utils/time')

module.exports = {
name: 'forward',
Expand Down
22 changes: 11 additions & 11 deletions src/utils/time.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = function formatMSHHMMSS(num) {
return [86400000, 3600000, 60000, 1000, 1].reduce((p, c) => {
let res = Math.floor(num / c);
num -= res * c;
return [...p, res];
}, [])
.map((v, i) => i <= 1 && v === 0 ? "" : [i === 4 ? "." : "", v < 10 ? `0${v}` : v, [" Days, ", ":", ":", "", ""][i]].join(""))
.filter(Boolean)
.slice(0, -1)
.join("");
}
module.exports = function formatMSHHMMSS (num) {
return [86400000, 3600000, 60000, 1000, 1].reduce((p, c) => {
const res = Math.floor(num / c)
num -= res * c
return [...p, res]
}, [])
.map((v, i) => i <= 1 && v === 0 ? '' : [i === 4 ? '.' : '', v < 10 ? `0${v}` : v, [' Days, ', ':', ':', '', ''][i]].join(''))
.filter(Boolean)
.slice(0, -1)
.join('')
}

0 comments on commit 78d3552

Please sign in to comment.