Sha256: f87e775c59fbdc0e94ffc6553c8f6b706daf85c22049a106084bb638370093ef

Contents?: true

Size: 928 Bytes

Versions: 2

Compression:

Stored size: 928 Bytes

Contents

/*! Parser: dates - updated 10/26/2014 (v2.18.0) */
/* Extract dates using popular natural language date parsers */
/*jshint jquery:true */
;(function($){
"use strict";

	/*! Sugar (http://sugarjs.com/dates#comparing_dates) */
	/* demo: http://jsfiddle.net/Mottie/abkNM/4163/ */
	$.tablesorter.addParser({
		id: "sugar",
		is: function() {
			return false;
		},
		format: function(s) {
			var date = Date.create ? Date.create(s) : s ? new Date(s) : s;
			return date instanceof Date && isFinite(date) ? date.getTime() : s;
		},
		type: "numeric"
	});

	/*! Datejs (http://www.datejs.com/) */
	/* demo: http://jsfiddle.net/Mottie/abkNM/4164/ */
	$.tablesorter.addParser({
		id: "datejs",
		is: function() {
			return false;
		},
		format: function(s) {
			var date = Date.parse ? Date.parse(s) : s ? new Date(s) : s;
			return date instanceof Date && isFinite(date) ? date.getTime() : s;
		},
		type: "numeric"
	});

})(jQuery);

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jquery-tablesorter-1.16.5 vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date.js
jquery-tablesorter-1.16.4 vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date.js