zotero-mdnotes icon indicating copy to clipboard operation
zotero-mdnotes copied to clipboard

Incorrect output of "Date Added"

Open linxule opened this issue 5 years ago • 12 comments

With the latest update, the outputs of "Date Added" are incorrect that:

  1. "2020-01-23" becomes "2020-00-23"
  2. "2020-02-01" becomes "2020-01-01"

linxule avatar Sep 10 '20 14:09 linxule

Are these the dates of the Zotero item or the ones from the markdown files?

argenos avatar Sep 10 '20 15:09 argenos

Of the Zotero items. I have attached an example here 20200910182655@2x 20200910182705@2x

linxule avatar Sep 10 '20 17:09 linxule

That's strange... I'm not really modifying the dates of the item or the PDF attachments. The only date which could have been affected is the Modified date of the markdown files to reflect the last time they were exported.

Does this happen immediately after export?

argenos avatar Sep 10 '20 20:09 argenos

I had a check and report the same question: image image

It happens right after my first export.

herbhuang avatar Sep 11 '20 03:09 herbhuang

Same as above. It happened right after export with the most recent update.

linxule avatar Sep 11 '20 09:09 linxule

It might have something to do with the locale. Could you try with these? You'll have to change the extension from .zip to .xpi.

argenos avatar Sep 11 '20 10:09 argenos

Hi, argenos. Thanks for your work. I try the first mdnotes-0.0.7-fx.zipand it turns out that the problem in Date added filed persists.

herbhuang avatar Sep 14 '20 06:09 herbhuang

I'm having a hard time reproducing this. Just to make sure ... After installing the new version you need to try it with a new item, it won't fix the date of the previous item. I would suggest adding a dummy item and manually creating a note, and then exporting. Did you also try the 2nd file?

argenos avatar Sep 14 '20 08:09 argenos

@argenos I tried both files with two different dummy items. The issue seems to be unresolved. 20200915131256@2x 20200915131451@2x

linxule avatar Sep 15 '20 12:09 linxule

I'm getting this issue

PhilipMottershead avatar Feb 09 '21 19:02 PhilipMottershead

image image

I can replicate the issue in the run JavaScript window image

PhilipMottershead avatar Feb 09 '21 19:02 PhilipMottershead

So I found the issue it a months starts from 0

Date.prototype.getMonth() Returns the month (0–11) in the specified date according to local time.

PhilipMottershead avatar Feb 09 '21 19:02 PhilipMottershead