diff options
author | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-02-09 11:17:53 -0300 |
---|---|---|
committer | Nicolás Reynolds <fauno@kiwwwi.com.ar> | 2011-02-09 11:17:53 -0300 |
commit | c1d3642b275775ea560a553436d3d86ccdbf8c39 (patch) | |
tree | 1efa6af6eda3cc3b6b05eabc95464b5a3ca7a093 /media | |
parent | 4eda10d77f9a74f962343406ea54e72649787844 (diff) | |
parent | f1e476373a602327a5d23d2f92c7dc30ce2891fd (diff) |
Merge branch 'master' of git://projects.archlinux.org/archweb
Diffstat (limited to 'media')
-rw-r--r-- | media/archweb.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/media/archweb.js b/media/archweb.js index 330eeff9..52e817a4 100644 --- a/media/archweb.js +++ b/media/archweb.js @@ -58,9 +58,12 @@ if (typeof $.tablesorter !== 'undefined') { var matches = this.re.exec(s); if (!matches) return 0; /* skip group 6, group 7 is optional seconds */ - if (matches[7] == undefined) matches[7] = '0'; - return $.tablesorter.formatFloat(new Date( - matches[1],matches[2],matches[3],matches[4],matches[5],matches[7]).getTime()); + if (matches[7] == undefined) matches[7] = 0; + /* The awesomeness of the JS date constructor. Month needs to be + * between 0-11, because things have to be difficult. */ + var date = new Date(matches[1], matches[2] - 1, matches[3], + matches[4], matches[5], matches[7]); + return $.tablesorter.formatFloat(date.getTime()); }, type: 'numeric' }); |