Request For a PlugIn

edited November 28, 2018
I sure would like a PlugIn that would clean up the date fields to a constant format.

Formats that should be supported are

YYYY$MM$DD
MM$DD$YYYY
(Month name) DD, YYYY
DD (Month name) YYYY
(Month abbreviation). DD, YYYY
DD (Month abbreviation) YYYY

where $ is set { - / }

I have used a secondary sort on the date. When the date is "January 25, 2007" it takes up a lot of space on the screen to get the column wide enough to see the year which is of most interest.
  • What about just switching the "date" column for the "year" column?

    Cleaning up individual fields is another issue, but I think it must be done manually at this point. (For example, see: https://forums.zotero.org/discussion/comment/321504#Comment_321504 or https://forums.zotero.org/discussion/73007/cleanup-names-of-creators-publishers-cities-etc) Dates, in particular, have some quirks in Zotero (they're usually treated as date values rather than literal text, but it's complicated), so it could be especially difficult.
  • I'll look at the other threads, but it doesn't seem like quantum electrodynamics. For the truly anal, perhaps an option to Yes/No to approve each modification? If you select "No" you get a tag "#Date" on the item so you can find them manually.

    I've got a couple of thousand dates, so at 5 seconds per item it would take a couple of hours to spin through them all.
  • This really shouldn’t be a plugin but rather just a change to the Zotero code to show a uniformly formatted date regardless of how the date is entered in the field (like how the Date Accessed field works).

    A user contributed a pull request implementing this a while back (https://github.com/zotero/zotero/pull/1199), but they never finished addressing the issues raised by @dstillman. If someone were interested in working on this, I am sure the developers would welcome a new pull request.

  • I wonder about a log file for this. Maybe:

    Some sort of bibliographic entry for the item (cr,lf)
    DATE IN xxxxx Date Stored xxxxx
  • edited November 28, 2018
    I looked through the other threads. It seems some sort of batch editing is planned for Zotero 5.2. I don't think that would help.

    I'm guessing that Zotero must sort the date as text in some table, then also parse it to YYYY-MM-DD format somewhere else.

    So perhaps I could change "January" to "Jan." with a search and replace, but how to change "Jan. 1, 2018" to "2018/01/01"? You'd need a very specific batch editing for dates, not just string text manipulation.

    Hence the desire for a specific plugin...
  • In a different thread I wondered about having a Zotero display name and a Zotero citation name for each author. If you don't override the Zotero display name then Zotero would just use the citation name by default.

    Perhaps something similar for dates? Have Zotero store whatever was the input text in one field and how it was interpreted in another field.
Sign In or Register to comment.