You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
380 B
JavaScript
18 lines
380 B
JavaScript
/**
|
|
* Automatically detect British (dd/mm/yyyy) date types. Goes with the UK
|
|
* date sorting plug-in.
|
|
* @name UK date type detection
|
|
* @author Andy McMaster
|
|
*/
|
|
|
|
jQuery.fn.dataTableExt.aTypes.unshift(
|
|
function ( sData )
|
|
{
|
|
if (sData !== null && sData.match(/^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d$/))
|
|
{
|
|
return 'date-uk';
|
|
}
|
|
return null;
|
|
}
|
|
);
|