momentjs vs datejs (v10)

Revision 10 of this benchmark created on


Description

moment.js and date.js are 2 libraries offering similar functionalities that is lacking in basic javascript.

Results on Chrome: moment.js is lighter, and offers much faster parsing. On the other hand, date.js offers much faster formatting and manipulation.

Preparation HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.1.0/moment.min.js"></script>
<script>
  var momentJS = moment();
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
moment.js parse
moment("2013-06-20T18:00:00", "YYYY-MM-DDTHH:mm");
ready
DateJS parse
Date.parse("2013-06-20T18:00:00");
ready
moment.js format
 
ready
DateJS format
 
ready
moment.js manipulation
 
ready
DateJS manipulation
 
ready
moment.js Overall
 
ready
DateJS Overall
 
ready

Revisions

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