However, this regex doesn't encompass all formats in which date can be written. If we could replace it by regex that accounts of all standard date formats, this could be nice addition to the library.
I propose this for all mm/dd/yyyy or mm-dd-yyyy or mm.dd.yyyy formats
Issue by stripathi669 Sun Feb 8 13:25:27 2015 Originally opened as https://github.com/codelucas/newspaper/issues/119
First of all, let me say that this library is amazing.
Getting back at the topic the code for Date Parsing uses 3 techniques:
In practical scenario, when first two don't work, one has to rely on third. However, currently, your code uses this regex:
DATEREGEX = r'([./-]{0,1}(19|20)\d{2})[./-]{0,1}(([0-3]{0,1}[0-9][./-])|(\w{3,5}[./-_]))([0-3]{0,1}[0-9][./-]{0,1})?'
However, this regex doesn't encompass all formats in which date can be written. If we could replace it by regex that accounts of all standard date formats, this could be nice addition to the library.
I propose this for all mm/dd/yyyy or mm-dd-yyyy or mm.dd.yyyy formats
@codelucas : What do you think of it ?