dtinfer

Crates.iodtinfer
lib.rsdtinfer
version0.1.1
sourcesrc
created_at2020-10-12 20:18:14.337118
updated_at2020-10-13 09:35:35.682162
descriptionInfer DateTime format
homepagehttps://github.com/klangner/dtinfer.rs
repositoryhttps://github.com/klangner/dtinfer.rs
max_upload_size
id298888
size22,804
Krzysztof Langner (klangner)

documentation

https://docs.rs/dtinfer

README

Infer DateTime format

Build Status Crates.io Crates.io docs.rs

Library for infering date time format from the given string.

Usage

Add dependency to your project

dfinfer = "0.1"

And then:

use dtinfer;

let pattern = infer_best("2020-10-09 15:24:50+00:00").unwrap();
assert_eq!(pattern, "%Y-%m-%d %H:%M:%S%z")

Features

Only ISO 8601 like dates are supported as for now. Check tests for examples.

License

Licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 7

cargo fmt