Skip to content

not finding date in multi-line string seperated by newlines - suggest adding functionality #1323

Description

@jj-github-jj

was not finding date in a multi-line string which had a date in it
The following code did make dateparser usable but it would be nicer if it already did this without needing the following code
maybe an optional argument split_lines='\n' to let user define how to split text so dateparser can succeed in more use cases than failing to find the date

#split into lines and find line with date pattern
lines = text.split('\n')
for line in lines:
date = dateparser.parse(line)
if date:
break

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions