updated lastDayOfMonth() for formatting