|
@@ -43,11 +43,8 @@ export default {
|
|
|
const hours = Math.floor(duration / (60 * 60));
|
|
|
const formatHours = () => {
|
|
|
if (hours > 0) {
|
|
|
- if (hours > 1) {
|
|
|
- if (hours < 10) return `0${hours} hours `;
|
|
|
- return `${hours} hours `;
|
|
|
- }
|
|
|
- return `0${hours} hour `;
|
|
|
+ if (hours > 1) return `${hours} hours `;
|
|
|
+ return `${hours} hour `;
|
|
|
}
|
|
|
return "";
|
|
|
};
|
|
@@ -55,11 +52,8 @@ export default {
|
|
|
const minutes = Math.floor((duration - hours * 60 * 60) / 60);
|
|
|
const formatMinutes = () => {
|
|
|
if (minutes > 0) {
|
|
|
- if (minutes > 1) {
|
|
|
- if (minutes < 10) return `0${minutes} minutes `;
|
|
|
- return `${minutes} minutes `;
|
|
|
- }
|
|
|
- return `0${minutes} minute `;
|
|
|
+ if (minutes > 1) return `${minutes} minutes `;
|
|
|
+ return `${minutes} minute `;
|
|
|
}
|
|
|
return "";
|
|
|
};
|
|
@@ -67,11 +61,8 @@ export default {
|
|
|
const seconds = Math.floor(duration - hours * 60 * 60 - minutes * 60);
|
|
|
const formatSeconds = () => {
|
|
|
if (seconds > 0) {
|
|
|
- if (seconds > 1) {
|
|
|
- if (seconds < 10) return `0${seconds} seconds `;
|
|
|
- return `${seconds} seconds `;
|
|
|
- }
|
|
|
- return `0${seconds} second `;
|
|
|
+ if (seconds > 1) return `${seconds} seconds `;
|
|
|
+ return `${seconds} second `;
|
|
|
}
|
|
|
return "";
|
|
|
};
|