momentjs vs datejs

JavaScript performance comparison

Revision 11 of this test case created

Preparation code

<script src="https://raw.github.com/datejs/Datejs/master/build/date.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.2.1/moment.min.jshttps://raw.github.com/timrwood/moment/master/moment.jshttps://raw.github.com/timrwood/moment/master/moment.jshttps://raw.github.com/timrwood/moment/master/moment.jshttps://raw.github.com/timrwood/moment/master/moment.jshttps://raw.github.com/timrwood/moment/master/moment.js"></script>
<script>
  var DateJS = new Date();
  var momentJS = moment();
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
moment.js parse
moment('7-10-1986', 'MM-DD-YYYY');
pending…
DateJS parse
Date.parse('7-10-1986', "MM-dd-yyyy");
pending…
moment.js format
momentJS.format('MM-DD-YYYY h:mm:ss a');
pending…
DateJS format
DateJS.toString('MM-dd-yyyy h:mm:ss t');
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment