refactor day range setup