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