def dates(self, xpath):
        result = []
        for value in self.strings(xpath):
            if 'T' in value:
                if value.endswith('Z'):
                    value = value[:-1] + ' UTC'
                    fmt = '%Y-%m-%dT%H:%M:%S %Z'
                else:
                    fmt = '%Y-%m-%dT%H:%M:%S'
            elif value.count('-') == 2:
                fmt = '%Y-%m-%d'
            elif value.count('/') == 2:
                fmt = '%Y/%m/%d'
            else:
                fmt = '%Y%m%d'
            try:
                result.append(datetime.datetime.strptime(value, fmt))
            except __HOLE__:
                raise ValueError('Unknown date format: %s' % value)
        return result
dataset/ETHPy150Open infrae/moai/moai/utils.py/XPath.dates