diff options
Diffstat (limited to 'app/assets/javascripts/vue_shared/mixins/timeago.js')
-rw-r--r-- | app/assets/javascripts/vue_shared/mixins/timeago.js | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/app/assets/javascripts/vue_shared/mixins/timeago.js b/app/assets/javascripts/vue_shared/mixins/timeago.js index 45452f2ea35..c5f41d81167 100644 --- a/app/assets/javascripts/vue_shared/mixins/timeago.js +++ b/app/assets/javascripts/vue_shared/mixins/timeago.js @@ -1,4 +1,4 @@ -import { formatDate, getTimeago } from '../../lib/utils/datetime_utility'; +import { formatDate, getTimeago } from '~/lib/utils/datetime_utility'; /** * Mixin with time ago methods used in some vue components @@ -14,25 +14,5 @@ export default { tooltipTitle(time) { return formatDate(time); }, - - durationTimeFormatted(duration) { - const date = new Date(duration * 1000); - - let hh = date.getUTCHours(); - let mm = date.getUTCMinutes(); - let ss = date.getSeconds(); - - if (hh < 10) { - hh = `0${hh}`; - } - if (mm < 10) { - mm = `0${mm}`; - } - if (ss < 10) { - ss = `0${ss}`; - } - - return `${hh}:${mm}:${ss}`; - }, }, }; |