momentjs vs datejs (v2)

Revision 2 of this benchmark created by Tim on


Preparation HTML

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

<script src="https://raw.github.com/timrwood/moment/master/moment.js"></script>
<script>
  var DateJS = new Date();
  var momentJS = moment();
</script>

Test runner

Ready to run.

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

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.