Implemented a rough, but complete date range function