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

Added w3c support. #62

Closed
wants to merge 1 commit into from
Closed

Added w3c support. #62

wants to merge 1 commit into from

Conversation

svmk
Copy link

@svmk svmk commented Feb 7, 2016

It's may parse these formats:

  • YYYY-MM-DD
  • YYYY-MM-DDThh:mmTZD
  • YYYY-MM-DDThh:mm:ssTZD
  • YYYY-MM-DDThh:mm:ss.sTZD

These formats are not supported:

  • YYYY
  • YYYY-MM

Added functions:

  • format::parse::parse_w3c<'a>(parsed: &mut Parsed, mut s: &'a str) -> ParseResult<(&'a str, ())>
  • datetime::DateTime::parse_from_w3c(s: &str) -> ParseResult<DateTime>
  • datetime::DateTime::to_w3c(&self) -> String
  • format::parsed::Parsed::to_w3c_datetime(&self) -> ParseResult<DateTime>

Added unit-tests:

  • test_w3c

@svmk
Copy link
Author

svmk commented Jan 3, 2017

Now its in package https://crates.io/crates/chrono_utils

@svmk svmk closed this Jan 3, 2017
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.

None yet

1 participant