2 releases

0.1.1 Oct 13, 2020
0.1.0 Oct 12, 2020

#8 in #infer

MIT/Apache

11KB
222 lines

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.

Dependencies

~1MB
~15K SLoC