it would be good if we added some comment to this whole block explaining what format will be used on `startTime`, `endTime`, `startDate` and `endDate` (`long-date-format` and `short-time-format`)

also make sure that `date` is replaced by `startDate` (to keep it consistent)