debian-mirror-gitlab/app/assets/javascripts/vue_shared/mixins/timeago.js

19 lines
335 B
JavaScript
Raw Normal View History

2017-09-10 17:25:29 +05:30
import '../../lib/utils/datetime_utility';
/**
* Mixin with time ago methods used in some vue components
*/
export default {
methods: {
timeFormated(time) {
const timeago = gl.utils.getTimeago();
return timeago.format(time);
},
tooltipTitle(time) {
return gl.utils.formatDate(time);
},
},
};