Find the first day of the time intervals in which a set of dates fall
index_date(x, period)
x
a base::Date() vector
base::Date()
period
a time period, e.g. "year" or "month"