Zotero is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources.
Go to file
Dan Stillman e73285ffc5 Improve date field handling
- Item.setField() stores dates in a multipart format beginning with an SQL date followed by the user's entry, so "November 3, 2006" becomes "2006-11-03 November 3, 2006" -- date field entries are parsed with Zotero.Date.strToDate() if not already in multipart format

- Item.getField() returns just the user part unless passed the new second parameter, _unformatted_, which returns the field directly from DB without processing (e.g. the full multipart string)

- Added SQLite triggers on the itemData table to enforce multipart format even if the table is modified outside the API

- Migration step to update existing dates

- Indicator next to date field to show what we've parsed and a tooltip over the date field to show the SQL date -- though I'm not sure how well the abbreviation part will localize (i.e. can you abbreviate 'month' in Chinese?)

One obvious problem is how to handle date ranges when sorting or searching, which may end up rendering this whole method fairly useless (though I guess the multipart format could begin with two SQL dates instead of just one, at the cost of some storage space...).


Other changes:

- Utilities.lpad() handling for undefined value parameter

- new Zotero.Date methods: strToMultipart(), isMultipart(), multipartToSQL(), multipartToStr(), isSQLDate(), sqlHasYear(), sqlHasMonth, sqlHasDay getLocaleDateOrder() (the last one unused for now)

- try/catch around manual itemData INSERT execute() statements in Item.save()
2006-11-03 09:23:24 +00:00
chrome Improve date field handling 2006-11-03 09:23:24 +00:00
components And use the correct new component name ourselves... 2006-10-10 23:14:30 +00:00
defaults/preferences Default to the field mode of the previous creator when adding a new row, and if first row, use the last-used mode program-wide 2006-10-21 09:25:12 +00:00
chrome.manifest Added Chinese (simplified) and German localizations from BabelZilla translators. Updated chrome.manifest to reflect new localizations. These localizations are not 100% complete or correct, but I expect that we will get corrections quickly as users spot mistakes. Currently there is a UI issue where the Chinese characters spill off of the tabs in the item details pane. 2006-10-27 17:28:45 +00:00
install.rdf Version numbers back to .SVN for auto-update 2006-10-28 15:11:01 +00:00
license.txt Closes #63, Add ECL license info to source code 2006-10-04 17:16:56 +00:00
scrapers.sql - fixed XML issues with PubMed scraper (although probably not the issue that everyone seems to be experiencing) 2006-11-02 00:33:50 +00:00
system.sql Improve date field handling 2006-11-03 09:23:24 +00:00
update.rdf Version numbers back to .SVN for auto-update 2006-10-28 15:11:01 +00:00
userdata.sql Improve date field handling 2006-11-03 09:23:24 +00:00