Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Windows
Desktop
one year ago
Test name Executions per second
Luxon fromISO 263406.4 Ops/sec
Luxon fromJSDate 842898.9 Ops/sec
Moment 104405.8 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/luxon@3.0.3/build/global/luxon.min.js"></script>
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js'></script>
3
<script src="//unpkg.com/timeago.js">
4
</script>
Tests:
  • Luxon fromISO

     
    luxon.DateTime.fromISO("2020-02-19T00:51:53.623839+00:00", { zone: "utc" });
  • Luxon fromJSDate

     
    luxon.DateTime.fromJSDate(new Date("2020-02-19T00:51:53.623839+00:00"), { zone: "utc" });
  • Moment

     
    moment("2020-02-19T00:51:53.623839+00:00")
  • Luxon timeAgoFrom

     
    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 timeAgoFrom

     
    moment("2020-02-19T00:51:53.623839+00:00").locale("fr-FR").fromNow();
  • time-ago timeAgoFrom

    x
     
        var timeagostuff = require('time-ago');
    timeagostuff.format(Date.now() - new Date("19/02/2020 01:51:54"), 'fr');