Slightly modified version of Frank's BibTeX patch for "January" issue
This commit is contained in:
parent
eb52e48913
commit
79d3122f58
1 changed files with 2 additions and 2 deletions
|
@ -1818,7 +1818,7 @@ function doImport() {
|
||||||
// some fields are, in fact, macros. If that is the case then we should not put the
|
// some fields are, in fact, macros. If that is the case then we should not put the
|
||||||
// data in the braces as it will cause the macros to not expand properly
|
// data in the braces as it will cause the macros to not expand properly
|
||||||
function writeField(field, value, isMacro) {
|
function writeField(field, value, isMacro) {
|
||||||
if(!value) return;
|
if(!value && typeof value != "number") return;
|
||||||
value = value + ""; // convert integers to strings
|
value = value + ""; // convert integers to strings
|
||||||
Zotero.write(",\n\t"+field+" = ");
|
Zotero.write(",\n\t"+field+" = ");
|
||||||
if(!isMacro) Zotero.write("{");
|
if(!isMacro) Zotero.write("{");
|
||||||
|
@ -2007,7 +2007,7 @@ function doExport() {
|
||||||
if(item.date) {
|
if(item.date) {
|
||||||
var date = Zotero.Utilities.strToDate(item.date);
|
var date = Zotero.Utilities.strToDate(item.date);
|
||||||
// need to use non-localized abbreviation
|
// need to use non-localized abbreviation
|
||||||
if(date.month) {
|
if(typeof date.month == "number") {
|
||||||
writeField("month", months[date.month], true);
|
writeField("month", months[date.month], true);
|
||||||
}
|
}
|
||||||
if(date.year) {
|
if(date.year) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue