Year granularity functionality added

Can now search by year granularity between a date range. Granularity
code could use some refactoring, but it appears to be working.