Since we're doing the calculation on the rails side now, could we clean this up to just use the given date params?