Implemented the date range calculation for a given month.