1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

use struct_iterable::Iterable;
#[derive(Debug, PartialEq, Eq, Iterable)]
/// The basic Date struct
pub struct Date {
    pub day: i8,
    pub month: i8,
    pub year: i16,
}

#[derive(Debug, PartialEq, Eq, Iterable)]
/// The basic DateTime struct
pub struct DateTime {
    pub second: i8,
    pub minute: i8,
    pub hour: i8,
    pub day: i8,
    pub month: i8,
    pub year: i16,
}
#[derive(Debug, PartialEq, Eq, Iterable)]
/// Used as a measure of distance between dates
pub struct TimeDifference {
    // will be used to show the amount of distance of each between dates. It will be the difference across all I.E. : Oct 7 and nov 9 2023: 2 days, 1 month
    pub seconds: i32,
    pub minutes: i32,
    pub hours: i32,
    pub days: i32,
    pub months: i32,
    pub years: i32,
}
/// Unimplemented enum for increase and decrease methods
pub enum TimeSpan {
    // will be used for increase and decrease methods
    seconds(i32),
    minutes(i32),
    hours(i32),
    days(i32),
    months(i32),
    years(i32),
}
/// Eval methods that are impl by macro for both Date and DateTime
pub trait datekindEvals {
    fn isLeapYear(&self) -> bool;
    fn weekday(&self) -> Result<String, std::io::Error>;
    fn weekday_as_int(&self) -> Result<i8, std::io::Error>;
    fn sharesDay(&self, date2: &Self) -> bool;
    fn sharesMonth(&self, date2: &Self) -> bool;
    fn sharesYear(&self, date2: &Self) -> bool;
}
/// Operator methods that are impl by macro for both Date and Dateime
pub trait datekindOperators {
    fn last_two_digits_year(&self) -> String;
}

pub trait x {
    // used for creating String methods
    fn as_Date(&self, format: &str) -> Date;
}
pub trait y {
    // used for creating &str methods
    fn with_separators(&self, separator: &char) -> String;
}
#[derive(PartialEq)]
pub enum two_nums {
    larger,
    smaller,
    equal,
}