reformat code
fixed daterange off by one