The native TableSorter 'usLongDate' fails if the timezone is added
like this:

Nov 12, 2008 1:25 PM (PST)
Nov 11, 2008 2:25 PM (EST)

So I chopped the timezone off with my own custom parser like in the
below.  But once I add my custom parser, the native parser
'usLongDate' doesn't run!

Can I run two parsers over the same data?

$.tablesorter.addParser({
        // set a unique id
        id: 'strip_tz',
        is: function(s) {
                        // return false so this parser is not auto detected
                        return false;
        },
        format: function(s) {
                        // format your data for normalization
                        return s.substring(0,(s.length-5));
        },
        // set type, either numeric or text
        type: 'numeric'
});

Of course I could just use ISO datatime format like
"2008-11-12T21:21:42+00:00" but humans have a hard time reading
that.  ;-)

Thanks!

http://www.t1shopper.com/

Reply via email to