added new date range function, needs tests