{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/2b9d5c4f1c40bb0cf107e6bed20d3cb1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2b9d5c4f1c40bb0cf107e6bed20d3cb1","url":"https://api.github.com/users/sshreeves","login":"sshreeves","id":1022651},"milestone":null,"assignee":null,"updated_at":"2011-11-11T16:34:38Z","labels":[],"closed_at":null,"comments":4,"url":"https://api.github.com/repos/BibApp/BibApp/issues/40","body":"BibApp allows you to specify the date of publication down to the day, which is good. However, for many items there is no day or month of publication, just a year. In the current configuration, if you only specify a year, it looks like BibApp defaults to year-01-01 rather than just the year. This is confusing and often just wrong. We should be able to specify just the year without any month or day information. It would also be useful to be able to specify just a year and month with no day specification.","html_url":"https://github.com/BibApp/BibApp/issues/40","title":"Publication date defaults to year-01-01","number":40,"id":1554172,"created_at":"2011-09-02T18:53:13Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/c925028bd49e1959ab209fb3e02fe0de?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c925028bd49e1959ab209fb3e02fe0de","url":"https://api.github.com/users/hading","login":"hading","id":379024},"updated_at":"2011-11-11T16:34:38Z","url":"https://api.github.com/repos/BibApp/BibApp/issues/comments/2710048","body":"Another idea would be to split the publication date into publication_date_year, publication_date_month, and publication_date_day.  There could then be a publication_date method to put it back together respecting missing pieces, one to put it together but fill in missing pieces (if need be). There could also be validations to ensure that year is present, month is between 1-12 if present, and if day is present then month is present and day is appropriate for the month/year combination. \r\n\r\nAn advantage of this approach is that there are some sorts on publication_date when retrieving information. This sort would be trivial to do in this scheme. \r\n\r\nIt would also be easy to convert the existing database to this scheme. \r\n\r\nThe harder part with this idea is the need to redo the views. We either lose the Rails date_picker functionality or at least have to intercept and massage the results in the controller. It's probably cleaner to just redo it entirely.\r\n\r\nI'm again not sure how this would interact with the import functionality. We probably need to do some work, but perhaps it can skip the part where the citation is parsed and be done only when a work is actually created.  But I suspect the problems here will be more or less the same regardless of what scheme we pick.","id":2710048,"created_at":"2011-11-11T16:34:38Z"}}