Apply repository-wide ESLint auto-fix formatting pass
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -19,23 +19,23 @@ export default function abbreviateNumber(totalSeconds) {
|
||||
let minutes = 0;
|
||||
let hours = 0;
|
||||
let days = 0;
|
||||
let result = '';
|
||||
let symbols = ['d', 'h', 'm', 's'];
|
||||
let result = "";
|
||||
let symbols = ["d", "h", "m", "s"];
|
||||
|
||||
totalSeconds = parseInt(totalSeconds);
|
||||
if(!isNaN(totalSeconds)) {
|
||||
if (!isNaN(totalSeconds)) {
|
||||
seconds = totalSeconds % 60;
|
||||
minutes = (Math.floor(totalSeconds - seconds) / 60) % 60;
|
||||
hours = (Math.floor(totalSeconds / 3600)) % 24;
|
||||
hours = Math.floor(totalSeconds / 3600) % 24;
|
||||
days = Math.floor(totalSeconds / (3600 * 24));
|
||||
};
|
||||
}
|
||||
|
||||
const units = [days, hours, minutes, seconds];
|
||||
for(let i = 0; i < units.length; i++) {
|
||||
if(units[i] > 0) result += units[i] + symbols[i] + " ";
|
||||
for (let i = 0; i < units.length; i++) {
|
||||
if (units[i] > 0) result += units[i] + symbols[i] + " ";
|
||||
}
|
||||
result = result.trim();
|
||||
if(totalSeconds === 0) result = '0';
|
||||
if (totalSeconds === 0) result = "0";
|
||||
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user