Date entry and export to BibLaTeX

Dear Zotero community,

First of all, thans for your wonderful application! I've tried many reference managers in my life, but Zotero is my very favourite!

However, I am having a little problem while exporting my bibliography to BibLaTeX. I have a large library with, amongst others, a few web sites. Though I have all entry fields set up properly, some date fields (date as in: the creation of the web page) are not exported to the .bib file. Some entries have {yyyy-mm-dd} in the date field of the bib file, which is exactly what I want. Though, some websites only get the year {yyyy}.

Trying a few other ways to enter the dates into Zotero learns that the dates are properly exported if (and only if) the date in the date field is formatted dd/mm/yyyy. The problem is, however, that I can't change all dates to this format. If I enter 02/01/2014 for instance, Zotero converts sees this as a mm/dd/yyyy format, implying that the date is the 1st of Feb instead of the 2nd of Jan.

If I write the date in full, the whole date is not exported either.

Does anyone have an idea how to fix this?

Thnx in advance

EDIT: Actually, I tried some other things and now it doesn't make sense to me anymore. 3 out of 5 websites are exported properly, regardless of the date format. The other 2 are just getting the year, even though their date field is complete with month and day data :/
  • The BibLaTeX translator should export full dates whenever these are stored in Zotero. Zotero recognizes various forms of date entry - using ISO (yyyy-mm-dd) is safest, but other forms, such as "May 5, 2014" work, too.
    dd/mm/yyyy is ambiguous for days up to 12, so that's the one format I'd not use.

    Zotero signals to you which date parts it recognizes and in which order using the "Y M D" letter at the right of the date field. If you do see Y M D in Zotero you should get a full date in BibLaTeX. If that's not the case we'd want to take a closer look.
  • edited May 5, 2014
    Dear Adam,

    Thnx for your response. I'm familiar with the Y M D letters next to the date and tried your suggestion to use the ISO format. Unfortunately, changing the date to 2013-01-24 did not change the exported date :( The exported date is {2013}..

    How can I help you in getting a closer look?

    Best regards,
  • Export the item to Zotero RDF (no notes or files). Open the exported file with a text editor (e.g. notepad, TextEdit), select all, copy & paste to gist.github.com (no registration required). Create Public gist (bottom of the window) and post the link here.
  • Here you go!

    https://gist.github.com/anonymous/5ea5bf06e5a7c187c3d6

    I put 5 web pages in the file. All have ISO date format. The upper 2 are exported correctly to biblatex, the latter 3 only have the year.

    Thnx in advance!
  • I (one of the authors of the biblatex translator) can confirm the problem with your data. It actually seems to be a problem with the function Zotero.Utilities.strToISO, which seems to be failing for dates in January (according to my quick and non-extensive testing, I just tested some other strings like "2012-01-20").

    This is beyond me though...
  • edited May 6, 2014
    We have seen this once before, quite awhile ago, in another context. Months returned from a JS date object start from 0, and 0 tests false in a condition statement. One way to fix it would be to test for date.month === typeof "numeric" instead.
  • Fixed in the latest 4.0 Beta and for 4.0.21. Thanks for tracking this down.
  • Awesome news! Thnx for your effort guys, I'll check again after the update :)
Sign In or Register to comment.