| 1 |
// This file is part of ICU4X. For terms of use, please see the file |
| 2 |
// called LICENSE at the top level of the ICU4X source tree |
| 3 |
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ). |
| 4 |
|
| 5 |
// https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations |
| 6 |
#![cfg_attr(not(any(test, doc)), no_std)] |
| 7 |
#![cfg_attr( |
| 8 |
not(test), |
| 9 |
deny( |
| 10 |
clippy::indexing_slicing, |
| 11 |
clippy::unwrap_used, |
| 12 |
clippy::expect_used, |
| 13 |
clippy::panic, |
| 14 |
) |
| 15 |
)] |
| 16 |
#![warn(missing_docs)] |
| 17 |
|
| 18 |
//! Time and timezone functionality. |
| 19 |
//! |
| 20 |
//! This module is published as its own crate ([`icu_time`](https://docs.rs/icu_time/latest/icu_time/)) |
| 21 |
//! and as part of the [`icu`](https://docs.rs/icu/latest/icu/) crate. See the latter for more details on the ICU4X project. |
| 22 |
|
| 23 |
#[cfg(feature = "alloc")] |
| 24 |
extern crate alloc; |
| 25 |
|
| 26 |
pub mod provider; |
| 27 |
pub mod scaffold; |
| 28 |
#[path = "third_party.rs"] |
| 29 |
pub mod unstable_third_party; |
| 30 |
|
| 31 |
#[cfg(feature = "ixdtf")] |
| 32 |
mod ixdtf; |
| 33 |
#[cfg(feature = "ixdtf")] |
| 34 |
pub use ixdtf::ParseError; |
| 35 |
|
| 36 |
pub mod zone; |
| 37 |
#[doc(no_inline)] |
| 38 |
pub use zone::{TimeZone, TimeZoneInfo}; |
| 39 |
|
| 40 |
mod types; |
| 41 |
#[cfg(feature = "unstable")] |
| 42 |
pub use types::ZonedTime; |
| 43 |
pub use types::{DateTime, Hour, Minute, Nanosecond, Second, Time, ZonedDateTime}; |
| 44 |
|
| 45 |
#[cfg(feature = "unstable_chrono_0_4")] |
| 46 |
mod chrono; |
| 47 |
#[cfg(feature = "unstable_jiff_0_2")] |
| 48 |
mod jiff; |
| 49 |
#[cfg(feature = "unstable_time_0_3")] |
| 50 |
mod time_crate; |