Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Date JS VS MomentJS - isDate/isMoment
(version: 1)
Comparing performance of:
Date JS vs MomentJS
Created:
9 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/moment@2.29.4/moment.min.js"></script>
Script Preparation code:
function isDate(input) { return ( input instanceof Date || Object.prototype.toString.call(input) === '[object Date]' ); } var testObj = { foo: bar };
Tests:
Date JS
const isObj = !isDate(testObj) && !moment.isMoment(testObj)
MomentJS
const isObj = !moment.isDate(testObj) && !moment.isMoment(testObj)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Date JS
MomentJS
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
Date JS
54519260.0 Ops/sec
MomentJS
54557848.0 Ops/sec
Related benchmarks:
Moment.js inicialization with raw string vs inicialization with Date instance
Date vs Moment Same Day
Moment.js string vs Date in constructor
CUSTOM1 MomentJS vs Native Date
MomentJS VS Date
MomentJS VS Date - ttlSec
MomentJS VS Date VS Date-Fns - getRoundedDate
MomentJS VS Date VS Date-Fns - getRoundedDate #2
Date JS VS MomentJS - isValid
Comments
Confirm delete:
Do you really want to delete benchmark?