Human Readable Timestamp Component – moments-ago

moments-ago is a Vue.js component that converts the timestamp into a human-readable format like xx days ago.

How to use it:

1. Import and register the moments-ago component.

import VueMomentsAgo from 'vue-moments-ago'
export default{
  components: {
    VueMomentsAgo
  }
}

2. Specify the Datatime (ISO 8601) in the moments-ago component. That’s it.

<vue-moments-ago 
  date="2020-06-08T21:22:22.285Z" 
/>

3. Add prefix & suffix to the result.

<vue-moments-ago 
  date="2020-06-08T21:22:22.285Z" 
  prefix="Updated: " 
  suffix="ago"
/>

Download Details:

Author: jillztom

Live Demo: https://codesandbox.io/s/m4x9kw090p

Download Link: https://github.com/jillztom/vue-moments-ago/archive/master.zip

Official Website: https://github.com/jillztom/vue-moments-ago

Install & Download:

npm install vue-moments-ago

Add Comment