Thanks for the feedback.
WRT recognising illegal dates, note from the docs that no validation is
performed - this is left to the caller and there are plenty of other
modules on CPAN that are very capable in this respect.
To clarify, the intended application for this module is where a date has
been acquired from user input, e.g. a field on a web form, and must be
interpreted for further processing (rather than just stored as literal
data). It is therefore assumed that the content of the input string, in its
entirety, is intended to be a date. The purpose of this module is try
to understand which of the many possible date representations has been used
and make the best possible interpretation of the string with this
assumption granted. If the assumption turns out to be false, i.e. the input
string is not in fact a date and therefore cannot be interpreted as such,
that is for the client software to decide and act upon.
Finding dates inside long strings of other text is likewise not one of the
intended applications though it is an interesting possibility. Refactoring
the code to expose the location of the found date would be non-trivial
owing to the approach used, which is designed to allow the broadest
possible range of acceptable inputs, but I do not think it would be
impossible. If you would still like this functionality despite the
foregoing caveats then please let me know and I will give it some thought.
Merlyn
On Fri, 6 Oct 2017 at 16:29 Kris Van Bruwaene via RT <
bug-Date-Parse-Lite@rt.cpan.org> wrote:
Show quoted text> Fri Oct 06 11:28:36 2017: Request 123208 was acted upon.
> Transaction: Ticket created by kris.vanbruwaene@gmail.com
> Queue: Date-Parse-Lite
> Subject: Bug & feature request
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: kris.vanbruwaene@gmail.com
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=123208 >
>
>
> Thanks for this nice module!
> 1) Minor bugs: it "recognises" dates like Feb. 30 or June 31, which it
> should not...
> 2) feature request:
> I plan to use it to extract dates from text files, but the rest of the text
> needs to be parsed for other things. Would it be possible to add two
> methods to indicate either the start and end index of the recognised date,
> or the parts of the string preceding and following the date?
> Thanks
> Kris.
>
--
--
Merlyn