tablesorter.parsers.js revision 9c98bbdfbc6de66b588aed9e1711e3fb9de0bf7e
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
$.tablesorter.addParser({
id: 'dates',
is: function (s) {
// return false so this parser is not auto detected
return false;
},
format: function (s) {
if (!date)
return new Date().getTime();
var d = date[1];
var m = date[2];
var y = date[3];
},
type: 'numeric'
});
$.tablesorter.addParser({
id: 'groksizes',
is: function (s) {
// return false so this parser is not auto detected
return false;
},
format: function (s) {
// convert to bytes
if (unit == "KiB") {
return (num * 1024);
} else if (unit == "MiB") {
} else if (unit == "GiB") {
} else {
return (num);
}
},
type: 'numeric'
});