]> git.proxmox.com Git - rustc.git/blob - src/vendor/humantime/src/lib.rs
New upstream version 1.26.0+dfsg1
[rustc.git] / src / vendor / humantime / src / lib.rs
1 //! Human-friendly time parser and formatter
2 //!
3 //! Features:
4 //!
5 //! * Parses durations in free form like `15days 2min 2s`
6 //! * Formats durations in similar form `2years 2min 12us`
7 //! * Parses and formats timestamp in `rfc3339` format: `2018-01-01T12:53:00Z`
8 //! * Parses timestamps in a weaker format: `2018-01-01 12:53:00`
9 //!
10 //! Timestamp parsing/formatting is super-fast because format is basically
11 //! fixed.
12 //!
13 //! See [serde-humantime] for serde integration.
14 //!
15 //! [serde-humantime]: https://docs.rs/serde-humantime/0.1.1/serde_humantime/
16 #![warn(missing_debug_implementations)]
17 #![warn(missing_docs)]
18
19 #[macro_use] extern crate quick_error;
20
21 mod duration;
22 mod wrapper;
23 mod date;
24
25 pub use duration::{parse_duration, Error as DurationError};
26 pub use duration::{format_duration, FormattedDuration};
27 pub use wrapper::{Duration, Timestamp};
28 pub use date::{parse_rfc3339, parse_rfc3339_weak, Error as TimestampError};
29 pub use date::{format_rfc3339, format_rfc3339_seconds, format_rfc3339_nanos};
30 pub use date::{Rfc3339Timestamp};