Author: jablko
Date: Wed Oct 27 22:51:08 2010
New Revision: 8601
Log:
Handle "March 6-15, 2007" and "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:49:58 2010 (r8600)
+++ trunk/js/date.js Wed Oct 27 22:51:08 2010 (r8601)
@@ -10,7 +10,7 @@
var min = [];
var max = [];
- 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);
+ var matches =
value.match(/\d+(?:[-/]0*(?:1[0-2]|\d)(?:[-/]0*(?:3[01]|[12]?\d))?(?!\d))?/g);
if (matches)
{
jQuery.each(matches, function (index)
@@ -29,7 +29,9 @@
jQuery.each(min, function (index)
{
- if (this < matches[index])
+ if (this < matches[index] && (0 !== index
+ || 31 < this || 32 > matches[index])
+ || 0 === index && 31 < this && 32 > matches[index])
{
return false;
}
--
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.