Author: jablko
Date: Wed Oct 27 21:49:58 2010
New Revision: 8600

Log:
Drop buggy Date() and be pragmatic, "March 6-15, 2007" is more probable than 
"In the year of our lord, 6-15"

Modified:
   trunk/js/date.js

Modified: trunk/js/date.js
==============================================================================
--- trunk/js/date.js    Wed Oct 27 21:31:12 2010        (r8599)
+++ trunk/js/date.js    Wed Oct 27 21:49:58 2010        (r8600)
@@ -7,18 +7,10 @@
         {
           function parse(value)
           {
-            var date = new Date(value);
-            if (!isNaN(date.getFullYear()))
-            {
-              date = [date.getFullYear(), date.getMonth() + 1, 
date.getDate()].join('-');
-
-              return [date, date];
-            }
-
             var min = [];
             var max = [];
 
-            var matches = 
value.match(/\d+(?:[-/]0*(?:1[0-2]|\d)(?:[-/]0*(?:3[01]|[12]?\d))?(?!\d))?/g);
+            var matches = 
value.match(/0*(?:3[2-9]|[4-9]\d|\d{3,})(?:[-/]0*(?:1[0-2]|\d)(?:[-/]0*(?:3[01]|[12]?\d))?(?!\d))?/g);
             if (matches)
             {
               jQuery.each(matches, function (index)

-- 
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-commits?hl=en.

Reply via email to