Answers for "format iso time in very human readable format js such as n seconds ago etc"

0

format iso time in very human readable format js such as n seconds ago etc

// 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
Posted by: Guest on August-19-2021

Code answers related to "format iso time in very human readable format js such as n seconds ago etc"

Code answers related to "Javascript"

Browse Popular Code Answers by Language