/*! Parser: Month - updated 11/2/2015 (v2.24.1) */ /* Demo: http://jsfiddle.net/Mottie/abkNM/4169/ */ /*jshint jquery:true */ !function(a){"use strict";var b=a.tablesorter;b.dates=a.extend({},{ // See http://mottie.github.io/tablesorter/docs/example-widget-grouping.html // for details on how to use CLDR data for a locale to add data for this parser // CLDR returns an object { 1: "Jan", 2: "Feb", 3: "Mar", ..., 12: "Dec" } months:{en:{1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"}}},b.dates),b.addParser({id:"month",is:function(){return!1},format:function(a,c,d,e){if(a){var f,g,h=c.config, // add options to 'config.globalize' for all columns --> globalize : { lang: 'en' } // or per column by using the column index --> globalize : { 0 : { lang: 'fr' } } i=h.globalize&&(h.globalize[e]||h.globalize)||{},j=b.dates.months[i.lang||"en"];h.ignoreCase&&(a=a.toLowerCase());for(g in j)if("string"==typeof g&&(f=j[g],h.ignoreCase&&(f=f.toLowerCase()),a.match(f)))return parseInt(g,10)}return a},type:"numeric"})}(jQuery);