chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Add flexible format supports to DateTime::parse_from_rfc3339

Open foxhlchen opened this issue 4 years ago • 0 comments

DateTime::parse_from_rfc3339 lacks of some iso-8601 format supports which makes it very hard to collaborate with tools such as GNU date.

This commit adds support for thoses formats generated by GNU data:

date --iso-8601=ns 2021-04-15T09:49:00,321433476+08:00

date --iso-8601=minutes 2021-04-15T09:49+08:00

date --iso-8601=hours 2021-04-15T09+08:00

Signed-off-by: foxhlchen [email protected]

Thanks for contributing to chrono!

  • [ ] Have you added yourself and the change to the changelog? (Don't worry about adding the PR number)
  • [ ] If this pull request fixes a bug, does it add a test that verifies that we can't reintroduce it?

foxhlchen avatar Apr 15 '21 04:04 foxhlchen