If you're adjusting the `enddate` surely you don't have to adjust the days as well since we want to X day period either from today midnight or yesterday midnight