Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
moment vs date-fns 2025
It's not a deep validation; I'm just comparing ONE function that those two libraries have in common.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
Browser:
Chrome 136
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
11 months ago
Test name
Executions per second
moment
335846.7 Ops/sec
date-fns
279295.0 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/date-fns/4.1.0/cdn.min.js"></script>
Script Preparation code:
window.__date__ = new Date(); window.__expected__ = '2000/01/06';
Tests:
moment
var actual = moment(__date__).format('YYYY/MM/DD'); console.assert(actual === __expected__);
date-fns
var actual = dateFns.format(__date__, 'yyyy/MM/dd'); console.assert(actual === __expected__);