commit 91dbb4ab181457d6149fab37d366ea36daa9a7dd
parent c81931e65053670a0e8b0c66cc4bc84444fe4cc9
Author: Simon Kornblith <simon@simonster.com>
Date: Sat, 9 Apr 2011 18:25:54 +0000
fixes #1731, "09/2010" is parsed as "2010-00-09"
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js
@@ -247,7 +247,7 @@ Zotero.Date = new function(){
// first, directly inspect the string
var m = _slashRe.exec(string);
if(m &&
- (!m[5] || m[3] == m[5] || (m[3] == "\u5e74" && m[5] == "\u6708")) && // require sane separators
+ ((!m[5] || !m[3]) || m[3] == m[5] || (m[3] == "\u5e74" && m[5] == "\u6708")) && // require sane separators
((m[2] && m[4] && m[6]) || (!m[1] && !m[7]))) { // require that either all parts are found,
// or else this is the entire date field
// figure out date based on parts