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

Can parse iso datetime in daterange #1748

Merged
merged 1 commit into from Jun 13, 2018
Merged

Can parse iso datetime in daterange #1748

merged 1 commit into from Jun 13, 2018

Conversation

noirbizarre
Copy link
Contributor

This PR improve daterange parsing to handle iso datetimes.

See https://sentry.data.gouv.fr/share/issue/bcc9e83697b34fed82f4bde84695d879/ for an example of harvested iso daterange failing.

Parser also properly handle date and datetime values.

@noirbizarre noirbizarre added this to the 1.4.1 milestone Jun 13, 2018
@noirbizarre noirbizarre self-assigned this Jun 13, 2018
@noirbizarre noirbizarre requested a review from a team June 13, 2018 09:45
Fix WWW-DATAGOUVFR-YQS

def test_parse_daterange_end_full_iso(self):
assert daterange_end('1984-06-07T00:00:00+00:00') == date(1984, 6, 7)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no tests for dashes <= 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noirbizarre noirbizarre merged commit 0f0ac36 into opendatateam:master Jun 13, 2018
@noirbizarre noirbizarre deleted the daterange-parse-iso branch June 13, 2018 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants