Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
moment.js vs day.js vs date-fns set
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0
Browser:
Firefox 143
Operating system:
Windows
Device Platform:
Desktop
Date tested:
7 months ago
Test name
Executions per second
momentjs
540443.2 Ops/sec
dayjs
242335.2 Ops/sec
date-fns
1327520.6 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/dayjs/dayjs.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/dayjs/plugin/utc.js"></script> <script src="https://cdn.jsdelivr.net/npm/dayjs/plugin/timezone.js"></script> <script src="https://cdn.jsdelivr.net/npm/moment/moment.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/moment-timezone@0.5.48/builds/moment-timezone-with-data.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/date-fns/cdn.min.js"></script>
Script Preparation code:
var unix = 1724409214;
Tests:
momentjs
return moment(unix).set("hours", 0).set("minutes", 0).set("seconds", 0).set("milliseconds", 0);
dayjs
// dayjs.extend(window.dayjs_plugin_utc) // dayjs.extend(window.dayjs_plugin_timezone) return dayjs(unix).set("hours", 0).set("minutes", 0).set("seconds", 0).set("milliseconds", 0);
date-fns
return dateFns.set(new Date(unix), { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 })