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 parsing dates with trailing spaces (Resolves #11) #39

Conversation

angelosilvestre
Copy link
Contributor

@angelosilvestre angelosilvestre commented Jan 8, 2024

Fix parsing dates with trailing spaces. Resolves #11

If a feed contains a date with trailing spaces, for example 2024-01-08T00:19:00Z , the updated property of the WebFeed entry ends up being null.

This PR fixes the issue by trimming the date before parsing.

We probably want to re-organize the existing tests.

@angelosilvestre
Copy link
Contributor Author

@matthew-carroll Could you please review this PR?

@matthew-carroll
Copy link
Collaborator

We discussed offline that we should probably just test the parser because it would be unwieldy to maintain entire XML files for a detail as specific as an extra space in a single line.

@angelosilvestre
Copy link
Contributor Author

@matthew-carroll Updated.

Copy link
Collaborator

@matthew-carroll matthew-carroll left a comment

Choose a reason for hiding this comment

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

LGTM

@matthew-carroll matthew-carroll merged commit 8bbfb1e into Flutter-Bounty-Hunters:main Jan 13, 2024
1 check passed
matthew-carroll added a commit that referenced this pull request Jan 14, 2024
@angelosilvestre angelosilvestre deleted the 11_date_with_trailing_spaces branch January 15, 2024 12:14
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.

trailing whitespaces in date leads to null date
2 participants