mirror of
https://github.com/Troplo/Colubrina.git
synced 2024-06-03 12:21:06 +10:00
17 lines
424 B
JavaScript
17 lines
424 B
JavaScript
|
import Vue from "vue"
|
||
|
import dayjs from "dayjs"
|
||
|
import advancedFormat from "dayjs/plugin/advancedFormat"
|
||
|
import relativeTime from "dayjs/plugin/relativeTime"
|
||
|
import customParseFormat from "dayjs/plugin/customParseFormat"
|
||
|
|
||
|
Object.defineProperties(Vue.prototype, {
|
||
|
$date: {
|
||
|
get() {
|
||
|
dayjs.extend(advancedFormat)
|
||
|
dayjs.extend(relativeTime)
|
||
|
dayjs.extend(customParseFormat)
|
||
|
return dayjs
|
||
|
}
|
||
|
}
|
||
|
})
|