vue-moments-ago

A Vue.js component for dynamically updating human readable time format.
8,129 13
Install
npm install vue-moments-ago
Latest Version:0.2.0
Vue:2
License:MIT
Last Updated:May 23, 2024
Links: GitHub  ·  npm
Maintainer: jillztom

vue-moments-ago

A Vue.js component for updating human readable time format.

eg:

posted 2 minutes ago

this is automatically updated without any refresh. Checkout this Live Demo

Install

npm install vue-moments-ago

and in your component file script tag,

import VueMomentsAgo from 'vue-moments-ago'

export default{
  components: {
    VueMomentsAgo
  }
}

in the template, use:

<vue-moments-ago prefix="posted" suffix="ago" date="2018-05-02T20:22:22.285Z" lang="en"></vue-moments-ago>

result:

 posted 2 minutes ago

Props

Props Required Type Definition
prefix false String Any prefix string you want to add to the output
suffix false String Any suffix string you want to add to the output
date true String The date is in ISO 8601 (default format of moment.js)
language false String default is "en"

Support Language

We support English, Korean and Japanese. y Language options are available. default value is "en".

en kr jp

Related Packages

vue-moment

Handy Moment.js filters for your Vue.js project

3,393,663 1,305
vue-moment-tz

Handy Moment-timezone.js filters for your Vue.js project.

14,407 0
@rah-emil/vue-moment

Handy Moment.js filters for your Vue.js project

13,540 1
vue-moment-v3

vue-moment for vue.js v3

9,291 0
vue-jalali-moment

jalali(khorshidi, shamsi, شمسی, خورشیدی, جلالی) filters for your Vue.js project

8,456 41

Version History

Version Released License
0.2.0 MIT
0.1.3 MIT
0.1.2 MIT
0.1.1 ISC
0.1.0 ISC