-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add an RFC 3339 only mode #67
Comments
Thanks for the suggestion! It does seem like this could be a useful feature. This is a more limited version of #20, with a strict definition of what's accepted/rejected, so I personally find the idea more palatable. I'd be willing to accept a pull request for it, if you're up for it. |
Sounds like I've got a task for the weekend! |
Let me know if you have any trouble or questions. Check out CONTRIBUTING for some development tips & tricks. |
Resolves closeio#67
Resolves closeio#67
Resolves closeio#67
Resolves closeio#67
* Add parse_rfc3339 function Resolves #67 * Comma is not a valid RFC 3339 fractional seconds separator. * Added section to README describing the new method. * Added typing information for the new method.
When parsing data that I know should be in RFC 3339, I'd like a strict mode that rejects non-RFC3339-compliant strings like
2018-07-12
or2018-07-12T14Z
or2018-07-12T14:08:12
.(Mostly, I just want to be sure that I don't end up with a naive datetime when I expected a timezone-aware one, but validating that my data is actually RFC 3339 would be even better.)
It'd be nice to have a
parse_rfc3339()
function that is stricter thanparse_datetime()
and raises if it gets input that's valid ISO 8601 but not valid RFC 3339.The text was updated successfully, but these errors were encountered: