eyear = year + 1
                mtg_start = date(syear,smonth,sday)
                mtg_end = date(eyear,emonth,eday)
                #event.add('dtstart', mtg_start)
                #event.add('dtend', mtg_end)

                # Make a note of the three significant dates for
                # the course schedule
                r2 = re.match('^\*([^*]+)\*.*',fulltitle)
                if r2:
                    label = r2.group(1)
                    if label == 'Winter return':
                        pickledates[r2.group(1)] = mtg_end
                    else:
                        pickledates[r2.group(1)] = mtg_start
                
                if title == 'Oral examinations for the Masters degree (October entry)':
                    print 'OK!'
                    print mtg_start.strftime('%Y-%m-%d')
                    print mtg_end.strftime('%Y-%m-%d')
                cal.one_postgraduate_event(title,mtg_start,mtg_end)


f = open( gp.ics.src('Postgraduate_Calendar.ics'), 'wb')
f.write(cal.mastercal.as_string())
f.close()

pickler.dump(pickledates)

print 'Done.'