calendrical_calculations/lib.rs
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, doc)), 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 clippy::trivially_copy_pass_by_ref,
33 missing_debug_implementations,
34 )
35)]
36#![warn(missing_docs)]
37
38mod astronomy;
39/// Chinese-like lunar calendars (Chinese, Dangi)
40pub mod chinese_based;
41/// The Coptic calendar
42pub mod coptic;
43/// Error handling
44mod error;
45/// The ethiopian calendar
46pub mod ethiopian;
47/// The Hebrew calendar
48pub mod hebrew;
49pub mod hebrew_keviyah;
50/// Additional math helpers
51pub mod helpers;
52/// Various islamic lunar calendars
53pub mod islamic;
54/// The ISO calendar (also usable as Gregorian)
55pub mod iso;
56/// The Julian calendar
57pub mod julian;
58/// The persian calendar
59pub mod persian;
60/// Representation of Rata Die (R.D.) dates, which are
61/// represented as the number of days since ISO date 0001-01-01.
62pub mod rata_die;