PHASEXave/
lib.rs

1/*
2 * Copyright 2024 Stanislav Mikhailov (xavetar)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Permission is hereby granted, free of charge, to any person obtaining a copy
11 * of this software and associated documentation files (the "Software"), to deal
12 * in the Software without restriction, including without limitation the rights
13 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 * copies of the Software, and to permit persons to whom the Software is
15 * furnished to do so, subject to the following conditions:
16 *
17 * The above copyright notice and this permission notice shall be included in
18 * all copies or substantial portions of the Software.
19 *
20 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26 * THE SOFTWARE.
27 */
28
29#![allow(non_snake_case)]
30#![allow(non_camel_case_types)]
31#![allow(dead_code)]
32
33pub(crate) mod interface;
34pub(crate) mod platform;
35pub(crate) mod types;
36
37pub use interface::{Date};
38pub use interface::{Time};
39#[cfg(any(
40    feature = "platform_specific_functions_darwin",
41    feature = "platform_specific_functions_unix",
42    feature = "platform_specific_functions_windows"
43))]
44pub use interface::{Uptime};
45
46pub use crate::types::{
47    data::zone::{Sign, Zone},
48    planets::earth::calendar::{
49        view::{CalendarView},
50        traits::{
51            converter::{Julian, Gregorian, Solar},
52            day_of_week::{Xavetar, RataDie, Sakamoto}
53        },
54        constants::{
55            week::{Week},
56            months::{Months}
57        }
58    },
59};
60
61pub mod constants {
62    pub use crate::types::{
63        planets::earth::calendar::{
64            constants::{
65                week::{DAYS_IN_WEEK},
66                months::{MONTHS_IN_YEAR},
67            }
68        }
69    };
70}
71
72pub mod functions {
73    pub use crate::types::{
74        planets::earth::calendar::{
75            functions::{
76                is_leap_year
77            }
78        }
79    };
80}