Debian Codegraph @

third_party/rust/calendrical_calculations/src/lib.rs

raw
1 // This file is part of ICU4X.
2 //
3 // The contents of this file implement algorithms from Calendrical Calculations
4 // by Reingold & Dershowitz, Cambridge University Press, 4th edition (2018),
5 // which have been released as Lisp code at <https://github.com/EdReingold/calendar-code2/>
6 // under the Apache-2.0 license. Accordingly, this file is released under
7 // the Apache License, Version 2.0 which can be found at the calendrical_calculations
8 // package root or at http://www.apache.org/licenses/LICENSE-2.0.
9
10 //! Calendrical calculations
11 //!
12 //! This crate implements algorithms from
13 //! Calendrical Calculations by Reingold & Dershowitz, Cambridge University Press, 4th edition (2018)
14 //! as needed by [ICU4X](https://github.com/unicode-org/icu4x).
15 //!
16 //! Most of these algorithms can be found as lisp code in the book or
17 //! [on GithHub](https://github.com/EdReingold/calendar-code2/blob/main/calendar.l).
18 //!
19 //! The primary purpose of this crate is use by ICU4X, however if non-ICU4X users need this we are happy
20 //! to add more structure to this crate as needed.
21 // https://github.com/unicode-org/icu4x/blob/main/documents/process/boilerplate.md#library-annotations
22 #![cfg_attr(not(any(test, feature = "std")), no_std)]
23 #![cfg_attr(
24 not(test),
25 deny(
26 clippy::indexing_slicing,
27 clippy::unwrap_used,
28 clippy::expect_used,
29 clippy::panic,
30 clippy::exhaustive_structs,
31 clippy::exhaustive_enums,
32 missing_debug_implementations,
33 )
34 )]
35 #![warn(missing_docs)]
36
37 mod astronomy;
38 /// Chinese-like lunar calendars (Chinese, Dangi)
39 pub mod chinese_based;
40 /// The Coptic calendar
41 pub mod coptic;
42 /// Error handling
43 mod error;
44 /// The ethiopian calendar
45 pub mod ethiopian;
46 /// The Hebrew calendar
47 pub mod hebrew;
48 pub mod hebrew_keviyah;
49 /// Additional math helpers
50 pub mod helpers;
51 /// Various islamic lunar calendars
52 pub mod islamic;
53 /// The ISO calendar (also usable as Gregorian)
54 pub mod iso;
55 /// The Julian calendar
56 pub mod julian;
57 /// The persian calendar
58 pub mod persian;
59 /// Representation of Rata Die (R.D.) dates, which are
60 /// represented as the number of days since ISO date 0001-01-01.
61 pub mod rata_die;