From 45a2abcfd9b245c8d3b3b81d7bf806df1bcbbef5 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Thu, 18 Aug 2016 14:37:15 -0500 Subject: [PATCH 1/3] Docs & parser: Update sugar library v2.0+. Fixes #1275 --- dist/js/parsers/parser-date.min.js | 4 +- docs/example-locale-sort.html | 3 +- docs/example-option-custom-sort.html | 25 ++- docs/example-parsers-dates.html | 6 +- docs/index.html | 8 +- docs/js/sugar-1.4.1.min.js | 132 ++++++++++++++ docs/js/sugar.min.js | 264 ++++++++++++++------------- js/parsers/parser-date.js | 6 +- 8 files changed, 302 insertions(+), 146 deletions(-) create mode 100644 docs/js/sugar-1.4.1.min.js diff --git a/dist/js/parsers/parser-date.min.js b/dist/js/parsers/parser-date.min.js index 9f345a98..5495f369 100644 --- a/dist/js/parsers/parser-date.min.js +++ b/dist/js/parsers/parser-date.min.js @@ -1,4 +1,4 @@ /*! Parser: dates - updated 10/26/2014 (v2.18.0) */ -!function(a){"use strict";/*! Sugar (http://sugarjs.com/dates#comparing_dates) */ -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/) */ +!function(a){"use strict";/*! Sugar (https://sugarjs.com/docs/#/DateParsing) */ +a.tablesorter.addParser({id:"sugar",is:function(){return!1},format:function(a){var b=Date.create||Sugar.Date.create,c=b?b(a):a?new Date(a):a;return c instanceof Date&&isFinite(c)?c.getTime():a},type:"numeric"}),/*! Datejs (http://www.datejs.com/) */ 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); \ No newline at end of file diff --git a/docs/example-locale-sort.html b/docs/example-locale-sort.html index 95884432..b9e405cc 100644 --- a/docs/example-locale-sort.html +++ b/docs/example-locale-sort.html @@ -20,7 +20,8 @@ - - + + - + @@ -105,7 +105,7 @@
  • Parse Dates with these parsers