tablesorter/dist/js/parsers/parser-date.min.js
2015-10-31 10:20:22 -05:00

8 lines
767 B
JavaScript

/*! Parser: dates - updated 10/26/2014 (v2.18.0) */
/* Extract dates using popular natural language date parsers */
/*jshint jquery:true */
!function(a){"use strict";/*! Sugar (http://sugarjs.com/dates#comparing_dates) */
/* demo: http://jsfiddle.net/Mottie/abkNM/4163/ */
a.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(a){var b=Date.create?Date.create(a):a?new Date(a):a;return b instanceof Date&&isFinite(b)?b.getTime():a},type:"numeric"}),/*! Datejs (http://www.datejs.com/) */
/* demo: http://jsfiddle.net/Mottie/abkNM/4164/ */
a.tablesorter.addParser({id:"datejs",is:function(){return!1},format:function(a){var b=Date.parse?Date.parse(a):a?new Date(a):a;return b instanceof Date&&isFinite(b)?b.getTime():a},type:"numeric"})}(jQuery);