1 | //! Date and time types unconcerned with timezones. |
2 | //! |
3 | //! They are primarily building blocks for other types |
4 | //! (e.g. [`TimeZone`](../offset/trait.TimeZone.html)), |
5 | //! but can be also used for the simpler date and time handling. |
6 | |
7 | mod date; |
8 | pub(crate) mod datetime; |
9 | mod internals; |
10 | mod isoweek; |
11 | mod time; |
12 | |
13 | #[allow (deprecated)] |
14 | pub use self::date::{Days, NaiveDate, NaiveWeek, MAX_DATE, MIN_DATE}; |
15 | #[cfg (feature = "rustc-serialize" )] |
16 | #[allow (deprecated)] |
17 | pub use self::datetime::rustc_serialize::TsSeconds; |
18 | #[allow (deprecated)] |
19 | pub use self::datetime::{NaiveDateTime, MAX_DATETIME, MIN_DATETIME}; |
20 | pub use self::isoweek::IsoWeek; |
21 | pub use self::time::NaiveTime; |
22 | |
23 | #[cfg (feature = "__internal_bench" )] |
24 | #[doc (hidden)] |
25 | pub use self::internals::YearFlags as __BenchYearFlags; |
26 | |
27 | /// Serialization/Deserialization of naive types in alternate formats |
28 | /// |
29 | /// The various modules in here are intended to be used with serde's [`with` |
30 | /// annotation][1] to serialize as something other than the default [RFC |
31 | /// 3339][2] format. |
32 | /// |
33 | /// [1]: https://serde.rs/attributes.html#field-attributes |
34 | /// [2]: https://tools.ietf.org/html/rfc3339 |
35 | #[cfg (feature = "serde" )] |
36 | #[cfg_attr (docsrs, doc(cfg(feature = "serde" )))] |
37 | pub mod serde { |
38 | pub use super::datetime::serde::*; |
39 | } |
40 | |