Use yyyy-mm-dd as date for PDF extraction
argenos opened this issue · 0 comments
argenos commented
Would it be possible to format the date as yyyy-mm-dd
?
I can open a PR with the changes, but I'd like to ask what would be the preferred way to handle the preferences:
zotfile/defaults/preferences/defaults.js
Line 130 in 5540f52
Would substituting the existing preference for a string-based one, and substituting the ternary operator above for a switch case be alright?
// where predefined_options can be any of 'locale', 'utc' 'ISO' or 'yyyy-mm-dd'
pref("extensions.zotfile.pdfExtraction.dateFormat", "<predefined_options>");
Or would it be best to pass a different wildcard here, such as {'title': str_title, 'date': date_str, 'isodate': iso_date}
:
`