Handle out-of-range dates when indexing

Handle bad metadata case where invalid publication dates are
provided, for example 30th February. We drop the day in such
cases.