Repeated code based on number of days range
Repeated code based on number of days range