tablesorter
tablesorter copied to clipboard
usLongDate handle no space before AM/PM and ignore case
Would you mind changing usLongDate to handle "am", "pm", and not having a space before them?
ts.addParser({
id: "usLongDate",
is: function (s) {
return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s?[APap][mM]))$/));
}, format: function (s) {
s = s.replace(/([^\s])([APap][mM])/, "$1 $2");
return $.tablesorter.formatFloat(new Date(s).getTime());
}, type: "numeric"
});