Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
shaved more characters, minified is now smaller than before
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDarcyMurphy committed Jun 9, 2013
1 parent c829ac2 commit b3090bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion is.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions lib/is.js
Expand Up @@ -381,12 +381,13 @@
*/
function sortDates(x, y) {
y = !is.date(y) ? new Date() : y
return x.getFullYear() < y.getFullYear() ? -1
: x.getFullYear() > y.getFullYear() ? 1
: x.getMonth() < y.getMonth() ? -1
: x.getMonth() > y.getMonth() ? 1
: x.getDate() < y.getDate() ? -1
: x.getDate() > y.getDate() ? 1
var a = 'getFullYear', b = 'getMonth', c = 'getDate'
return x[a]() < y[a]() ? -1
: x[a]() > y[a]() ? 1
: x[b]() < y[b]() ? -1
: x[b]() > y[b]() ? 1
: x[c]() < y[c]() ? -1
: x[c]() > y[c]() ? 1
: 0
}

Expand Down

0 comments on commit b3090bb

Please sign in to comment.