DayMonthYear createDate = msg.getCreateDate();
// update the monthsWithMessages list
Iterator iter = this.monthsWithMessages.iterator();
while (iter.hasNext()) {
MonthYear curMonth = (MonthYear) iter.next();
if (createDate.getMonth() == curMonth.getMonth()
&& createDate.getYear() == curMonth.getYear()) {
return;
}
}
this.monthsWithMessages.add(createDate);