def day_selected(self, event):
        date = event.GetDate()
        # WX sometimes has year == 0 temporarily when doing state changes.
        if date.IsValid() and date.GetYear() != 0:
            year = date.GetYear()
            # wx 2.8.8 has 0-indexed months.
            month = date.GetMonth() + 1
            day = date.GetDay()
            try:
                self.value = datetime.date(year, month, day)
            except ValueError:
                print 'Invalid date:', year, month, day
                raise
        return
Check if a table exists in the database
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/date_editor.py/SimpleEditor.day_selected--crossover with--dataset/ETHPy150Open callowayproject/django-categories/categories/migration.py/table_exists