2015-11-06 19:41:19 +00:00
|
|
|
!function(a){"use strict";var b=50,c=a.tablesorter,d=(new Date).getFullYear();c.dates=a.extend({},c.dates,{regxxxxyy:/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{2})/,regyyxxxx:/(\d{2})[\/\s](\d{1,2})[\/\s](\d{1,2})/}),c.formatDate=function(a,c,e,f){if(a){var g,h,i=a.replace(/\s+/g," ").replace(/[-.,]/g,"/").replace(c,e),j=new Date(i);if(j instanceof Date&&isFinite(j)){for(g=j.getFullYear(),h=f&&f.config.dateRange||b;d-g>h;)g+=100;return j.setFullYear(g)}}return a},a.tablesorter.addParser({id:"ddmmyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$2/$1/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"mmddyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$1/$2/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"yymmdd",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regyyxxxx,"$2/$3/19$1",b)},type:"numeric"})}(jQuery);
|