| 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 |
//! Types for individual calendars |
| 6 |
pub(crate) mod buddhist; |
| 7 |
pub(crate) mod coptic; |
| 8 |
#[path = "east_asian_traditional.rs"] |
| 9 |
pub(crate) mod east_asian_traditional_internal; |
| 10 |
pub(crate) mod ethiopian; |
| 11 |
pub(crate) mod gregorian; |
| 12 |
pub(crate) mod hebrew; |
| 13 |
#[path = "hijri.rs"] |
| 14 |
pub(crate) mod hijri_internal; |
| 15 |
pub(crate) mod indian; |
| 16 |
pub(crate) mod iso; |
| 17 |
pub(crate) mod japanese; |
| 18 |
pub(crate) mod julian; |
| 19 |
pub(crate) mod persian; |
| 20 |
pub(crate) mod roc; |
| 21 |
|
| 22 |
pub(crate) mod abstract_gregorian; |
| 23 |
|
| 24 |
pub use buddhist::Buddhist; |
| 25 |
/// Customizations for the [`EastAsianTraditional`](east_asian_traditional::EastAsianTraditional) calendar. |
| 26 |
pub mod east_asian_traditional { |
| 27 |
pub use super::east_asian_traditional_internal::{China, EastAsianTraditional, Korea}; |
| 28 |
|
| 29 |
// TODO(#6962) Stabilize |
| 30 |
#[cfg(feature = "unstable")] |
| 31 |
pub use super::east_asian_traditional_internal::{EastAsianTraditionalYear, Rules}; |
| 32 |
} |
| 33 |
pub use coptic::Coptic; |
| 34 |
pub use east_asian_traditional_internal::{ChineseTraditional, KoreanTraditional}; |
| 35 |
pub use ethiopian::{Ethiopian, EthiopianEraStyle}; |
| 36 |
pub use gregorian::Gregorian; |
| 37 |
pub use hebrew::Hebrew; |
| 38 |
pub use hijri_internal::Hijri; |
| 39 |
/// Customizations for the [`Hijri`] calendar. |
| 40 |
pub mod hijri { |
| 41 |
#[allow(deprecated)] |
| 42 |
pub use super::hijri_internal::{ |
| 43 |
AstronomicalSimulation, TabularAlgorithm, TabularAlgorithmEpoch, TabularAlgorithmLeapYears, |
| 44 |
UmmAlQura, |
| 45 |
}; |
| 46 |
|
| 47 |
// TODO(#6962) Stabilize |
| 48 |
#[cfg(feature = "unstable")] |
| 49 |
pub use super::hijri_internal::{HijriYear, Rules}; |
| 50 |
|
| 51 |
#[doc(hidden)] |
| 52 |
/// These are unstable traits but we expose them on stable to |
| 53 |
/// icu_datetime. |
| 54 |
pub mod unstable_internal { |
| 55 |
pub use super::super::hijri_internal::Rules; |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
pub use indian::Indian; |
| 60 |
pub use iso::Iso; |
| 61 |
pub use japanese::Japanese; |
| 62 |
/// Deprecated |
| 63 |
#[deprecated(since = "2.2.0")] |
| 64 |
pub type JapaneseExtended = Japanese; |
| 65 |
pub use julian::Julian; |
| 66 |
pub use persian::Persian; |
| 67 |
pub use roc::Roc; |
| 68 |
|
| 69 |
/// Deprecated |
| 70 |
#[deprecated] |
| 71 |
pub use hijri::{ |
| 72 |
TabularAlgorithmEpoch as HijriTabularEpoch, TabularAlgorithmLeapYears as HijriTabularLeapYears, |
| 73 |
}; |
| 74 |
/// Deprecated |
| 75 |
#[deprecated] |
| 76 |
#[allow(deprecated)] |
| 77 |
pub type HijriSimulated = Hijri<hijri::AstronomicalSimulation>; |
| 78 |
/// Deprecated |
| 79 |
#[deprecated] |
| 80 |
pub type HijriUmmAlQura = Hijri<hijri::UmmAlQura>; |
| 81 |
/// Deprecated |
| 82 |
#[deprecated] |
| 83 |
pub type HijriTabular = Hijri<hijri::TabularAlgorithm>; |
| 84 |
/// Use [`KoreanTraditional`] |
| 85 |
#[deprecated(since = "2.1.0", note = "use `KoreanTraditional`")] |
| 86 |
pub type Dangi = KoreanTraditional; |
| 87 |
/// Use [`ChineseTraditional`] |
| 88 |
#[deprecated(since = "2.1.0", note = "use `ChineseTraditional`")] |
| 89 |
pub type Chinese = ChineseTraditional; |
| 90 |
|
| 91 |
pub use crate::any_calendar::{AnyCalendar, AnyCalendarKind}; |
| 92 |
|
| 93 |
/// Internal scaffolding types |
| 94 |
#[cfg_attr(not(feature = "unstable"), doc(hidden))] |
| 95 |
pub mod scaffold { |
| 96 |
/// Trait marking other traits that are considered unstable and should not generally be |
| 97 |
/// implemented outside of the calendar crate. |
| 98 |
/// |
| 99 |
/// <div class="stab unstable"> |
| 100 |
/// 🚧 This trait is considered unstable; it may change at any time, in breaking or non-breaking ways, |
| 101 |
/// including in SemVer minor releases. Do not implement this trait in userland unless you are prepared for things to occasionally break. |
| 102 |
/// </div> |
| 103 |
pub trait UnstableSealed {} |
| 104 |
} |