Added support for startDate and endDate options.