Created
October 17, 2008 09:57
-
-
Save mudge/17385 to your computer and use it in GitHub Desktop.
Parser for the jQuery Tablesorter Plugin to sort European dates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Parser for the jQuery Tablesorter Plugin to sort European dates, e.g. 30/02/08 */ | |
$.tablesorter.addParser({ | |
id: 'dates', | |
is: function(s) { return false }, | |
format: function(s) { | |
var dateArray = s.split('/'); | |
return "20" + dateArray[2] + dateArray[1] + dateArray[0]; | |
}, | |
type: 'numeric' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment