Using d3.extent to provide min and max dates
Remove redundant function