Skip to content

Infer data time format pattern

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

klangner/dtinfer.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Infer data time format pattern

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages