diff --git a/package-lock.json b/package-lock.json
index a9a341a..cd4958c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,7 +14,6 @@
"@nextcloud/l10n": "^2.2.0",
"@nextcloud/router": "^2.1.2",
"@nextcloud/vue": "8.0.0-beta.4",
- "date-format-parse": "^0.2.7",
"vue": "^2",
"vue-fragment": "^1.6.0",
"vue-material-design-icons": "^5.2.0",
@@ -8358,19 +8357,6 @@
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw=="
},
- "node_modules/fsevents": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
- "hasInstallScript": true,
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
- }
- },
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
diff --git a/package.json b/package.json
index 2914c20..99c8dc1 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,6 @@
"@nextcloud/l10n": "^2.2.0",
"@nextcloud/router": "^2.1.2",
"@nextcloud/vue": "8.0.0-beta.4",
- "date-format-parse": "^0.2.7",
"vue": "^2",
"vue-fragment": "^1.6.0",
"vue-material-design-icons": "^5.2.0",
diff --git a/src/components/Feed/List.vue b/src/components/Feed/List.vue
index 4e6d1b0..0fdcbf6 100644
--- a/src/components/Feed/List.vue
+++ b/src/components/Feed/List.vue
@@ -14,7 +14,7 @@
:url="episode.episodeImage" />
- {{ format(new Date(episode.episodeDuration*1000), 'H:mm:ss') }}
+ {{ formatTimer(new Date(episode.episodeDuration*1000)) }}
@@ -31,10 +31,9 @@
diff --git a/src/utils/time.js b/src/utils/time.js
index 2bba9ca..39aa5bc 100644
--- a/src/utils/time.js
+++ b/src/utils/time.js
@@ -25,3 +25,15 @@ export const formatTimeAgo = (date) => {
duration /= division.amount
}
}
+
+export const formatTimer = (date) => {
+ const minutes = date.getUTCMinutes().toString().padStart(2, 0)
+ const seconds = date.getUTCSeconds().toString().padStart(2, 0)
+ let timer = `${minutes}:${seconds}`
+
+ if (date.getUTCHours()) {
+ timer = `${date.getUTCHours()}:${timer}`
+ }
+
+ return timer
+}