From 91dbb4ab181457d6149fab37d366ea36daa9a7dd Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sat, 9 Apr 2011 18:25:54 +0000 Subject: [PATCH] fixes #1731, "09/2010" is parsed as "2010-00-09" --- chrome/content/zotero/xpcom/date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js index b29eb8a28..42b3ab440 100644 --- 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