angular/angular.js — pull request #2116 by lancevo (2013-03-07 15:14:24+00:00)
Title: fix orderBy filter to sort Date objects correctly

re-order the conditional statements in compare method to compare Date objects correctly. Since Date object does not equal Date object even the dates are the same, so it can be safely assumed than one is not less than nor greater than the other, it is the same as the other.

test
http://jsfiddle.net/lvo811/hkbY3/