Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
benches/ | 07-Sep-2024 | - | 105 | 87 | ||
src/ | 07-Sep-2024 | - | 1,224 | 917 | ||
.gitignore | D | 07-Sep-2024 | 28 | 4 | 3 | |
.travis.yml | D | 07-Sep-2024 | 474 | 34 | 27 | |
BUILD.gn | D | 07-Sep-2024 | 999 | 28 | 24 | |
Cargo.toml | D | 07-Sep-2024 | 605 | 25 | 22 | |
LICENSE-APACHE | D | 07-Sep-2024 | 11.1 KiB | 203 | 169 | |
LICENSE-MIT | D | 07-Sep-2024 | 1.2 KiB | 27 | 20 | |
README.OpenSource | D | 07-Sep-2024 | 354 | 11 | 11 | |
README.md | D | 07-Sep-2024 | 2.2 KiB | 69 | 46 | |
bulk.yaml | D | 07-Sep-2024 | 133 | 9 | 6 | |
vagga.yaml | D | 07-Sep-2024 | 2.3 KiB | 93 | 77 |
README.OpenSource
1[ 2 { 3 "Name": "humantime", 4 "License": "Apache License V2.0, MIT", 5 "License File": "LICENSE-APACHE, LICENSE-MIT", 6 "Version Number": "2.1.0", 7 "Owner": "fangting12@huawei.com", 8 "Upstream URL": "https://github.com/tailhook/humantime", 9 "Description": "A Rust library that provides support for human-readable time formatting." 10 } 11]
README.md
1Human Time 2========== 3 4**Status: stable** 5 6[Documentation](https://docs.rs/humantime) | 7[Github](https://github.com/tailhook/humantime) | 8[Crate](https://crates.io/crates/humantime) 9 10 11Features: 12 13* Parses durations in free form like `15days 2min 2s` 14* Formats durations in similar form `2years 2min 12us` 15* Parses and formats timestamp in `rfc3339` format: `2018-01-01T12:53:00Z` 16* Parses timestamps in a weaker format: `2018-01-01 12:53:00` 17 18Timestamp parsing/formatting is super-fast because format is basically 19fixed. 20 21Here are some micro-benchmarks: 22 23``` 24test result: ok. 0 passed; 0 failed; 26 ignored; 0 measured; 0 filtered out 25 26 Running target/release/deps/datetime_format-8facb4ac832d9770 27 28running 2 tests 29test rfc3339_chrono ... bench: 737 ns/iter (+/- 37) 30test rfc3339_humantime_seconds ... bench: 73 ns/iter (+/- 2) 31 32test result: ok. 0 passed; 0 failed; 0 ignored; 2 measured; 0 filtered out 33 34 Running target/release/deps/datetime_parse-342628f877d7867c 35 36running 6 tests 37test datetime_utc_parse_millis ... bench: 228 ns/iter (+/- 11) 38test datetime_utc_parse_nanos ... bench: 236 ns/iter (+/- 10) 39test datetime_utc_parse_seconds ... bench: 204 ns/iter (+/- 18) 40test rfc3339_humantime_millis ... bench: 28 ns/iter (+/- 1) 41test rfc3339_humantime_nanos ... bench: 36 ns/iter (+/- 2) 42test rfc3339_humantime_seconds ... bench: 24 ns/iter (+/- 1) 43 44test result: ok. 0 passed; 0 failed; 0 ignored; 6 measured; 0 filtered out 45``` 46 47See [humantime-serde] for serde integration (previous crate [serde-humantime] looks unmaintained). 48 49[serde-humantime]: https://docs.rs/serde-humantime/0.1.1/serde_humantime/ 50[humantime-serde]: https://docs.rs/humantime-serde 51 52License 53======= 54 55Licensed under either of 56 57* Apache License, Version 2.0, (./LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) 58* MIT license (./LICENSE-MIT or http://opensource.org/licenses/MIT) 59 60at your option. 61 62Contribution 63------------ 64 65Unless you explicitly state otherwise, any contribution intentionally 66submitted for inclusion in the work by you, as defined in the Apache-2.0 67license, shall be dual licensed as above, without any additional terms or 68conditions. 69