ananelson / oacensus

Home Page:http://ananelson.github.io/oacensus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

change publication dates to be strings

ananelson opened this issue · comments

Currently, the publication_date field on the Article model is a DateTime field.

However, frequently the only information we have about publication dates is a year, or a year-month. A DateTime field doesn't handle this particularly well. We end up having to make dummy dates like 2014-01-01 for 2014.

I am going to switch to a string based field in YYYY-MM-DD format so we can filter just by year by truncating the contents, rather than needing to do date arithmetic which is irrelevant for this.