Parse string <DATE_VALUE> string and make :py:class:`DateValue`
        instance out of it.

        :param str datestr: String with GEDCOM date, range, period, etc.

def parse(cls, datestr):
        """Parse string <DATE_VALUE> string and make :py:class:`DateValue`
        instance out of it.

        :param str datestr: String with GEDCOM date, range, period, etc.
        """
        # some apps generate DATE recods without any value, which is
        # non-standard, return empty DateValue for those
        if not datestr:
            return cls()
        for regex, tmpl in DATES:
            m = regex.match(datestr)
            if m is not None:
                groups = {}
                for key, val in m.groupdict().items():
                    if key != 'phrase':
                        val = CalendarDate.parse(val)
                    groups[key] = val
                return cls(tmpl, groups)
        # if cannot parse string assume it is a phrase
        return cls("($phrase)", dict(phrase=datestr))