Improving the way the indexCalc works so that I can pull D days from the
DB. Currently the index calc isn't pulling the right dates. Need to fix
that.