vue-dayjs
Day.js is a minimalist (Fast 2kB) JavaScript library for modern browsers with a largely Moment.js-compatible API. If you use Moment.js, you already know how to use Day.js.
How to use
; Vue; ...;
Notice
this plugin esm format only and it will take effect automatic.
Filtering Methods
Format
<span> someDate | </span>
Add
<span> someDate | </span>
Subtract
<span> someDate | </span>
Unix Timestamp (milliseconds)
<span> someDate | </span>
Unix Timestamp (seconds)
<span> someDate | </span>
Days in Month
<span> someDate | </span>
As JSON
<span> someDate | </span>
As Array
<span> someDate | </span>
As Object
<span> someDate | </span>
Is Leap Year
<span> someDate | </span>
Difference
<span> someDate | </span>
Addon filter : xx ago
<span> someDate | ago </span>
Addon directive : countdown
<v-countdown="{target: someDate, format: 'DD days HH:mm:ss'}" />
Method inject
Also can use dayjs in your logic layer.
{ this;}