Bug fix for dates

Fixed bug that arises when start and end dates span two months