Reduce the code into a function for finding the last day of the month. Also changed the title.