summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml1
-rw-r--r--src/lib.rs11
-rw-r--r--src/timetype.rs21
3 files changed, 27 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 10c4487..3b8f567 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,3 +13,4 @@ license = "MPL-2.0"
repository = "https://github.com/matthiasbeyer/kairos"
[dependencies]
+chrono = "0.4"
diff --git a/src/lib.rs b/src/lib.rs
index cdfbe1a..1b9f0d7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,6 +1,5 @@
-#[cfg(test)]
-mod tests {
- #[test]
- fn it_works() {
- }
-}
+
+extern crate chrono;
+
+pub mod timetype;
+
diff --git a/src/timetype.rs b/src/timetype.rs
new file mode 100644
index 0000000..b6de84e
--- /dev/null
+++ b/src/timetype.rs
@@ -0,0 +1,21 @@
+//! The module for the TimeType
+//!
+
+use chrono::NaiveDateTime;
+
+/// A Type of Time, currently based on chrono::NaiveDateTime
+pub enum TimeType {
+ Seconds(usize),
+ Minutes(usize),
+ Hours(usize),
+ Days(usize),
+ Weeks(usize),
+ Months(usize),
+ Years(usize),
+
+ Moment(NaiveDateTime),
+
+ Addition(Box<TimeType>, Box<TimeType>),
+ Subtraction(Box<TimeType>, Box<TimeType>),
+}
+