diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js index 9dd99ae58..d52090917 100644 --- a/chrome/content/zotero/xpcom/date.js +++ b/chrome/content/zotero/xpcom/date.js @@ -296,13 +296,13 @@ Zotero.Date = new function(){ // Parse 'yesterday'/'today'/'tomorrow' var lc = (string + '').toLowerCase(); - if (lc == 'yesterday' || (Zotero.getString && lc === Zotero.getString('date.yesterday'))) { + if (lc == 'yesterday' || (Zotero.isClient && lc === Zotero.getString('date.yesterday'))) { string = Zotero.Date.dateToSQL(new Date(Date.now() - 1000*60*60*24)).substr(0, 10); // no 'this' for translator sandbox } - else if (lc == 'today' || (Zotero.getString && lc == Zotero.getString('date.today'))) { + else if (lc == 'today' || (Zotero.isClient && lc == Zotero.getString('date.today'))) { string = Zotero.Date.dateToSQL(new Date()).substr(0, 10); } - else if (lc == 'tomorrow' || (Zotero.getString && lc == Zotero.getString('date.tomorrow'))) { + else if (lc == 'tomorrow' || (Zotero.isClient && lc == Zotero.getString('date.tomorrow'))) { string = Zotero.Date.dateToSQL(new Date(Date.now() + 1000*60*60*24)).substr(0, 10); } else {