Comments (4)
@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.
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.
thanks, that's good to know also
from datefinder.
Proposing a fix for issues I discovered, please have a look at #38 for more details.
Thanks!
from datefinder.
Related Issues (20)
- Major Bug while detecting day in year starting dates HOT 1
- Broken in 0.7.3 : date not detected with specific surrounding text HOT 1
- Can't find specific dates in %d.%m.%Y format HOT 2
- "On <month_name>" gives a weirdly extracted date value HOT 1
- Reference Date
- strict mode fills in and return incomplete dates (that are not supposed to be dates)
- Searching "Date: Tue, 23 Apr 1996 13:28:27 -0400" fails to obtain date HOT 3
- "French 75" is identified as date due to the presence if 75
- Datefind mistakenly identifies "pre-qualification may" as a date resulting in the date list as "on may"
- update print in example to Python 3
- Release version 0.7.4?
- UnknownTimezoneWarning warning HOT 1
- "datefinder" fails with this text "25/7//2023".
- REPLACEMENTS not comprehensive enough?
- Fails to detect correct day if text is '9.6 20:30'.
- Failed To detect the Date : 2022 05 October if Strict is True.
- Fails to detect date if text is '2023-10-04 decision' or '2023-10-04 novel'
- Detects datetime.datetime(2015, 12, 18, 0, 0) when given " 2015 " HOT 2
- Something wrong with no english strin months?
- find_dates fails when there's a number after a date HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datefinder.