Test name | Executions per second |
---|---|
Luxon fromISO | 263406.4 Ops/sec |
Luxon fromJSDate | 842898.9 Ops/sec |
Moment | 104405.8 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/luxon@3.0.3/build/global/luxon.min.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js'></script>
<script src="//unpkg.com/timeago.js">
</script>
luxon.DateTime.fromISO("2020-02-19T00:51:53.623839+00:00", { zone: "utc" });
luxon.DateTime.fromJSDate(new Date("2020-02-19T00:51:53.623839+00:00"), { zone: "utc" });
moment("2020-02-19T00:51:53.623839+00:00")
luxon.DateTime.fromJSDate(new Date("2020-02-19T00:51:53.623839+00:00"), { zone: "utc" }).toRelative({
base: luxon.DateTime.fromJSDate(new Date()),
locale: "fr-FR",
})
moment("2020-02-19T00:51:53.623839+00:00").locale("fr-FR").fromNow();
var timeagostuff = require('time-ago');
timeagostuff.format(Date.now() - new Date("19/02/2020 01:51:54"), 'fr');