Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
luxon 3.2.1 vs datefns vs moment vs dayjs (formatting)
Updated luxon
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0
Browser:
Firefox 121
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
datefns
824326.7 Ops/sec
luxon
506174.5 Ops/sec
moment
825659.0 Ops/sec
dayjs
444726.9 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js" integrity="sha512-bwD3VD/j6ypSSnyjuaURidZksoVx3L1RPvTkleC48SbHCZsemT3VKMD39KknPnH728LLXVMTisESIBOAb5/W0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdn.jsdelivr.net/npm/luxon@3.2.1/build/global/luxon.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/date-fns/1.30.1/date_fns.min.js" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js" integrity="sha512-qTXRIMyZIFb8iQcfjXWCO8+M5Tbc38Qi5WzdPOYZHIlZpzBHG3L3by84BBBOiRGiEb7KKtAOAs5qYdUiZiQNNQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Script Preparation code:
window.__date__ = new Date(); window.__luxon__ = luxon.DateTime.fromJSDate(__date__); window.__moment__ = moment(__date__); window.__dayjs__ = dayjs(__date__);
Tests:
datefns
dateFns.format(__date__, 'YYYY/MM/DD');
luxon
__luxon__.toFormat('yyyy/MM/dd');
moment
__moment__.format('YYYY/MM/DD');
dayjs
__dayjs__.format('YYYY/MM/DD');