Skip to content

Instantly share code, notes, and snippets.

@mudge
Created October 17, 2008 09:57
Show Gist options
  • Save mudge/17385 to your computer and use it in GitHub Desktop.
Save mudge/17385 to your computer and use it in GitHub Desktop.
Parser for the jQuery Tablesorter Plugin to sort European dates
/* 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