Giter Club home page Giter Club logo

Comments (4)

ranchodeluxe avatar ranchodeluxe commented on June 18, 2024

@AngelaO: thanks for your feedback! I'll look into this later this morning.

Did you install datefinder through pip? Or did you clone the github repo?

from datefinder.

ranchodeluxe avatar ranchodeluxe commented on June 18, 2024

@AngelaO: your wonderful feedback has been very fruitful, thank you.

It's led to the tickets #15, #16, #17 and most importantly #18 ( which your first example highlights ). I think I've got a fix for #16 and #17 ( your third example ).

more to come soon!

from datefinder.

AngelaO avatar AngelaO commented on June 18, 2024

@thebigspoon no worries, I installed through pip, have been removing the extra_tokens_pattern words from my strings for now as I'm not interested in date ranges, just strict dates but will check back for the fixes - thank you!

from datefinder.

akoumjian avatar akoumjian commented on June 18, 2024

All these issues have now been addressed!

In [17]: chk = "i am looking for a date june 4th 1996 to july 3rd 2013"

In [18]: print(next(datefinder.find_dates(chk, source=True)))
(datetime.datetime(1996, 6, 4, 0, 0), 'date june 4th 1996')

In [19]: chk = "i am looking for a date june 4th 1996 so july 3rd 2013"

In [20]: print(list(datefinder.find_dates(chk, source=True)))
[(datetime.datetime(1996, 6, 4, 0, 0), 'date june 4th 1996'), (datetime.datetime(2013, 7, 3, 0, 0), 'july 3rd 2013')]

In [21]: chk = "october 27 1994 to be put into effect on june 1 1995"

In [22]: print(list(datefinder.find_dates(chk, source=True)))
[(datetime.datetime(1994, 10, 27, 0, 0), 'october 27 1994'), (datetime.datetime(1995, 6, 1, 0, 0), 'on june 1 1995')]

In [23]: chk = "october 27 1994 so be put into effect on june 1 1995"

In [24]: print(list(datefinder.find_dates(chk, source=True)))
[(datetime.datetime(1994, 10, 27, 0, 0), 'october 27 1994'), (datetime.datetime(1995, 6, 1, 0, 0), 'on june 1 1995')]

In [25]: chk = 'june 5th 2012 to january 1st 2014'

In [26]: print(list(datefinder.find_dates(chk, source=True)))
[(datetime.datetime(2012, 6, 5, 0, 0), 'june 5th 2012'), (datetime.datetime(2014, 1, 1, 0, 0), 'january 1st 2014')]

from datefinder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.