underscore.date vs datejs

JavaScript performance comparison

Test case created by Tim

Preparation code

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

<script src="https://raw.github.com/timrwood/underscore.date/master/underscore.date.js"></script>
<script>
  var nowDate = new Date();
  var _nowDate = _date(nowDate);
</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
underscore.date parse
_date('7-10-1986', 'MM-DD-YYYY');
pending…
DateJS parse
Date.parse('7-10-1986', "MM-dd-yyyy");
pending…
underscore.date format
_nowDate.format('MM-DD-YYYY h:mm:ss a');
pending…
DateJS format
nowDate.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