mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-10-08 13:44:18 +00:00
9 lines
854 B
JavaScript
9 lines
854 B
JavaScript
/*! Parser: Month - updated 10/26/2014 (v2.18.0) */
|
|
/* Demo: http://jsfiddle.net/Mottie/abkNM/4169/ */
|
|
/*jshint jquery:true */
|
|
!function(a){"use strict";var b=a.tablesorter;b.dates=a.extend({},b.dates,{
|
|
// *** modify this array to match the desired language ***
|
|
monthCased:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),b.dates.monthLower=b.dates.monthCased.join(",").toLocaleLowerCase().split(","),b.addParser({id:"month",is:function(){return!1},format:function(c,d){if(c){var e=-1,f=d.config,g=f.ignoreCase?c.toLocaleLowerCase():c;
|
|
// return s (original string) if there isn't a match
|
|
// (non-weekdays will sort separately and empty cells will sort as expected)
|
|
return a.each(b.dates["month"+(f.ignoreCase?"Lower":"Cased")],function(a,b){return 0>e&&g.match(b)?(e=a,!1):void 0}),0>e?c:e}return c},type:"numeric"})}(jQuery); |