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

Fix date regex, add requirements.txt #5

Merged
merged 1 commit into from
Jan 11, 2022
Merged

Fix date regex, add requirements.txt #5

merged 1 commit into from
Jan 11, 2022

Conversation

fbarbe00
Copy link
Contributor

Purpose

The DATEREGEX variable did not work for all formats, and contained
very suboptimal code like (\d{4}|\d{4}).
For example, for dd/mm/yyyy format, the regex would not recognize
dates like 30/12/2000.

All datetime formats should now work, and although I believe the regex is
still not optimal, it should be a bit faster :).

Purpose
=======
The `DATEREGEX` variable did not work for all formats, and contained
very suboptimal code like `(\d{4}|\d{4})`.
For example, for `dd/mm/yyyy`, the regex would break for dates like
`30/12/2000`.

All datetime formats should now work and although I believe the regex is
still not optimal it should be faster :).
@joweich joweich merged commit f47d2b8 into joweich:main Jan 11, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants