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
extern crate chrono;
mod calendar;
mod date;
mod era;
mod holiday;
pub use calendar::Calendar;
pub use calendar::CalendarBuilder;
pub use calendar::is_leap;
pub use calendar::num_days;
pub use date::Date;
pub use date::Weekday;
pub use era::{era, Era};
pub use holiday::holiday;
pub type KoyomiResult<T> = Result<T, KoyomiError>;
#[derive(Debug)]
pub enum KoyomiError {
InvalidFormat(String),
InvalidTerm(Date, Date),
NotEnough,
NoTomorrow(i32, u32, u32),
NoYesterday(i32, u32, u32),
}