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
#![cfg_attr(docsrs, feature(doc_cfg))]
mod common;
mod date;
mod error;
mod format;
mod interval;
mod time;
mod timestamp;
#[cfg(feature = "oracle")]
mod oracle;
#[cfg(feature = "serde")]
mod serialize;
pub use crate::date::{Date, Month, WeekDay};
pub use crate::error::Error;
pub use crate::format::Formatter;
pub use crate::interval::{IntervalDT, IntervalYM};
pub use crate::time::Time;
pub use crate::timestamp::Timestamp;
#[cfg(feature = "oracle")]
pub use crate::oracle::Date as OracleDate;
pub trait DateTime {
fn year(&self) -> Option<i32>;
fn month(&self) -> Option<i32>;
fn day(&self) -> Option<i32>;
fn hour(&self) -> Option<i32>;
fn minute(&self) -> Option<i32>;
fn second(&self) -> Option<f64>;
}