Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Conversation

stevecavanagh
Copy link

This PR addresses some issues with the dateParser and its handling of certain invalid dates/formats that were mentioned in #3020.

@chrisirhc
Copy link
Contributor

I think the createrParser method should throw an exception when given an an invalid format. It knows when there are multiple format characters that map to the same field (yyyyy in this case, where yyyy and y maps to year) as it loops through the characters in the format.

I think checking whether the formats are used is a little roundabout since the createParser method should already know the given format is invalid.

The case that when a valid format is used but the input is invalid should be handled separately.

@stevecavanagh
Copy link
Author

Thanks @chrisirhc. I have submitted PR #3568 incorporating your suggestion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants