implement popularity date ranges in the db api