Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

format iso time in human readable format with moment js

// first install moment.js: npm i moment
import moment from 'moment'

let date = moment("2019-01-01", "YYYY-MM-DD");
console.log(date.fromNow()); // 3 years ago
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #format #iso #time #human #readable #format #moment #js
ADD COMMENT
Topic
Name
9+1 =