Parse <DATE> string and make :py:class:`CalendarDate` from it.

        :param str datestr: String with GEDCOM date.

def parse(cls, datestr):
        """Parse <DATE> string and make :py:class:`CalendarDate` from it.

        :param str datestr: String with GEDCOM date.
        """
        m = DATE_RE.match(datestr)
        if m is not None:
            day = None if m.group(2) is None else int(m.group(2))
            return cls(m.group(4), m.group(3), day, m.group(1))