Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make date parsing more robust #14

Open
jonasengelmann opened this issue Nov 20, 2024 · 0 comments · May be fixed by #15
Open

Make date parsing more robust #14

jonasengelmann opened this issue Nov 20, 2024 · 0 comments · May be fixed by #15

Comments

@jonasengelmann
Copy link

jonasengelmann commented Nov 20, 2024

I am using zotero link and currently the date is missing for some of my entries or the year is wrong by one. I did some digging and noticed that a date entry of "1998" is parsed into {year: 1997, month: 12, day: 31}, and the entry "12/2006" cannot be parsed at all ( I never enter dates manually, so I did not opt for this format, it is probably the result of fetching by DOI or ISBN). I also looked into Zotero's API response and found that it already provides a parsed date (meta.parsedDate), "12/2006" is returned as "2006-06". (There is also a handy meta.creatorSummary field).

I tried to create a PR, but it would require restructuring some data handling, as currently only item.data is handled. @MunGell would you rather prefer rewriting the ZoteroItem to mirror what is returned by the Zotero API or just add some extra fields?

@jonasengelmann jonasengelmann linked a pull request Dec 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant