Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Dates_Test
(version: 1)
Comparing performance of:
momentjs@2.29.4 vs dayjs vs date-fns
Created:
9 months ago
by:
Guest
Jump to the latest result
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@2.29.4/moment.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/moment-timezone@0.5.28/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@2.29.4
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 })
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
momentjs@2.29.4
dayjs
date-fns
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
9 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Browser/OS:
Chrome 138 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
momentjs@2.29.4
587419.8 Ops/sec
dayjs
366039.8 Ops/sec
date-fns
1183289.2 Ops/sec
Related benchmarks:
date utils test
dayjs vs luxon currentDate
dayjs vs luxon withTimezoneFromString
dayjs vs luxon timeToEnd
dayjs vs luxon between
Moment Dayjs Date-fns date format benchmark
Moment Dayjs Date-fns date format benchmark with abs comparitor
Moment Dayjs Date-fns end of day comparison
moment.js vs day.js vs date-fns set
Comments
Confirm delete:
Do you really want to delete benchmark?