Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Dates extracted #144

Open
daksh-2233 opened this issue Feb 25, 2021 · 3 comments
Open

Incorrect Dates extracted #144

daksh-2233 opened this issue Feb 25, 2021 · 3 comments

Comments

@daksh-2233
Copy link

Is there a way to specify particular date format (eg dd-mm-yyyy)
The date format in the text given is dd-mm-yyyy, but dates are extracted incorrectly

Ex: datefinder.find_dates('12.02.1980 ')
Expected Output:
12.02.1980

Actual output:
02.12.1980

Also, what is the purpose of base_date argument ?

@akoumjian
Copy link
Owner

If you know your dates are day first, pass the argument first="day" to the method.

datefinder.find_dates('12.02.1980', first='day')

https://github.com/akoumjian/datefinder/blob/master/datefinder/__init__.py#L305

@daksh-2233
Copy link
Author

Hi @akoumjian , I tried passing the argument but it shows error :

File "date_test.py", line 2, in
dates = datefinder.find_dates('12.02.2018',first="day")
TypeError: find_dates() got an unexpected keyword argument 'first'

@amzar96
Copy link

amzar96 commented Jun 14, 2021

Hi @akoumjian , I tried passing the argument but it shows error :

File "date_test.py", line 2, in
dates = datefinder.find_dates('12.02.2018',first="day")
TypeError: find_dates() got an unexpected keyword argument 'first'

I also received the same error :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants