Lightweight easy-to-use library for unit of measurement conversion.
Metric.js is a lightweight library that provides an easy way to convert units of measurement.
$ npm install --save metricjs
or
<script src="./js/metric.min.js"></script>
// If you're using node
const metric = require("metricjs")
let birthday = new Date("1995-03-01T00:00:00Z").getTime()
let age = metric.milliseconds(Date.now() - birthday).toYears() // 21.38...
You can find the full documentation here
MIT © Ian Ramos