momentjs vs datejs (v9)

Revision 9 of this benchmark created on


Preparation HTML

<script src="https://datejs.googlecode.com/files/date.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.0.0/moment.min.js"></script>
<script>
  var DateJS = new Date();
  var momentJS = moment();
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
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
moment.js parse
moment('07-10-1986', 'MM-DD-YYYY');
ready
DateJS parse
Date.parse('07-10-1986', "MM-dd-yyyy");
ready
moment.js manipulation
momentJS.add({ days: 5, months: 3 });
ready
DateJS manipulation
DateJS.add({ days: 5, months: 3 });
ready
moment.js Overall
moment('07-10-1986', 'MM-DD-YYYY').add({ days: 5 }).format('MM-DD-YYYY h:mm:ss a');
ready
DateJS Overall
Date.parse('07-10-1986', "MM-dd-yyyy").add({ days: 5 }).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.