Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
Date-fns 419697.3 Ops/sec
Dayjs 336783.9 Ops/sec
HTML Preparation code:
x
 
1
<script src="https://unpkg.com/dayjs@1.8.21/dayjs.min.js"></script>
2
<script src="https://igor.moomers.org/random/datefns.js"></script>
3
Script Preparation code:
 
window.ds = "2020-02-19T00:51:53.623839+00:00";
Tests:
  • Date-fns

     
    window.datefns.parseISO(window.ds);
    window.datefns.format(new Date(), "mm-dd-yyyy");
  • Dayjs

     
    dayjs(ds)
    dayjs().format("MM-DD-YYYY")