diff --git a/include/js/jquery.tablesorter.js b/include/js/jquery.tablesorter.js index 2619b2031..e42e3b782 100644 --- a/include/js/jquery.tablesorter.js +++ b/include/js/jquery.tablesorter.js @@ -742,6 +742,18 @@ type: "numeric" }); + ts.addParser({ + id: "DatummitUhrzeit", + is: function(s) { + alert("CHECK"); + return s.match(new RegExp(/^[0-9]{1,2}.[0-9]{1,2}.[0-9]{4} ( (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]))$/)); + }, + format: function(s) { + return $.tablesorter.formatFloat(new Date(s).getTime()); + }, + type: "numeric" + }); + ts.addParser({ id: "integer", is: function(s,table) { @@ -806,7 +818,8 @@ }, type: "numeric" }); - + + ts.addParser({ id: "percent", is: function(s) { diff --git a/include/js/jquery1.9.min.js b/include/js/jquery1.9.min.js index 4e4dbcc67..ca4358514 100644 --- a/include/js/jquery1.9.min.js +++ b/include/js/jquery1.9.min.js @@ -768,6 +768,17 @@ type: "numeric" }); + ts.addParser({ + id: "DatummitUhrzeit", + is: function(s) { + return s.match(new RegExp(/^[0-9]{1,2}.[0-9]{1,2}.[0-9]{4} (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]))$/)); + }, + format: function(s) { + return $.tablesorter.formatFloat(new Date(s.replace(/(\d{1,2})[\/\.](\d{1,2})[\/\.](\d{4})/, "$3/$2/$1")).getTime()); + }, + type: "numeric" + }); + ts.addParser({ id: "integer", is: function(s,table) {