Coder Social home page Coder Social logo

Comments (4)

ranchodeluxe avatar ranchodeluxe commented on September 1, 2024

@rawouter: nice eye

It looks like the regex parser is expecting a microsecond too. Not sure if the microsecond is a required part of ISO 8601. The regex parser might want to be flexible enough for both.

In [1]: import datefinder

In [2]: list(datefinder.find_dates('INFO[2017-02-03T09:04:08.023423Z] Done job'))
Out[2]: [datetime.datetime(2017, 2, 3, 9, 4, 8)]

from datefinder.

rawouter avatar rawouter commented on September 1, 2024

Thanks for your fast reply, I'm not an ISO 8601 pro so I'll leave it up to you, but indeed if the parser can be flexible enough that would be great ;-)

Talking about microsecond, I'm dealing with very nasty all kind of logs; these also fail I can also open an other issue if you want:

>>> list(datefinder.find_dates('[2017-02-03 07:52:36.958]', source=True))
[(datetime.datetime(2017, 2, 3, 7, 52, 36), '2017-02-03 07:52:36')]

--> missing the .958

from datefinder.

ranchodeluxe avatar ranchodeluxe commented on September 1, 2024

thanks, that's good to know also

from datefinder.

rawouter avatar rawouter commented on September 1, 2024

Proposing a fix for issues I discovered, please have a look at #38 for more details.

Thanks!

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.