mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
shortDate detection update - fixes issue #76
This commit is contained in:
parent
094e1116ad
commit
d2c6d5786a
@ -1041,8 +1041,8 @@
|
||||
ts.addParser({
|
||||
id: "shortDate", // "mmddyyyy", "ddmmyyyy" or "yyyymmdd"
|
||||
is: function(s) {
|
||||
// testing for ####-####-#### - so it's not perfect
|
||||
return (/\d{1,4}[\/\-\,\.\s+]\d{1,4}[\/\-\.\,\s+]\d{1,4}/).test(s);
|
||||
// testing for ####-##-#### - so it's not perfect
|
||||
return (/^(\d{2}|\d{4})[\/\-\,\.\s+]\d{2}[\/\-\.\,\s+](\d{2}|\d{4})$/).test(s);
|
||||
},
|
||||
format: function(s, table, cell, cellIndex) {
|
||||
var c = table.config, ci = c.headerList[cellIndex],
|
||||
|
Loading…
Reference in New Issue
Block a user