def extract_date_strings(self, text, strict=False):
<EOL>range_strings = list()<EOL>found_range = False<EOL>for range_match in RANGE_REGEX.finditer(text):<EOL><INDENT>range_captures = range_match.capturesdict()<EOL>dt1 = range_captures.get("<STR_LIT>", [])<EOL>dt2 = range_captures.get("<STR_LIT>", [])<EOL>for dt1_str in dt1:<EOL><INDENT>range_strings.extend(self.extract_date_strings(dt1_str, strict=strict))<EOL><DEDENT>for dt2_str in dt2:<EOL><INDENT>range_strings.extend(self.extract_date_strings(dt2_str, strict=strict))<EOL><DEDENT>found_range = True<EOL><DEDENT>for range_string in range_strings:<EOL><INDENT>yield range_string<EOL><DEDENT>if not found_range:<EOL><INDENT>for match in DATE_REGEX.finditer(text):<EOL><INDENT>match_str = match.group(<NUM_LIT:0>)<EOL>indices = match.span(<NUM_LIT:0>)<EOL>captures = match.capturesdict()<EOL>digits = captures.get("<STR_LIT>")<EOL>months = captures.get("<STR_LIT>")<EOL>if strict:<EOL><INDENT>complete = False<EOL>if len(digits) == <NUM_LIT:3>:  <EOL><INDENT>complete = True<EOL><DEDENT>elif (len(months) == <NUM_LIT:1>) and (<EOL>len(digits) == <NUM_LIT:2><EOL>):  <EOL><INDENT>complete = True<EOL><DEDENT>if not complete:<EOL><INDENT>continue<EOL><DEDENT><DEDENT>match_str = re.sub(r"<STR_LIT>", "<STR_LIT:U+0020>", match_str)<EOL>match_str = match_str.strip(STRIP_CHARS)<EOL>yield match_str, indices, captures<EOL><DEDENT><DEDENT>
Scans text for possible datetime strings and extracts them
:param strict: Strict mode will only return dates sourced with day, month, and year