diff --git a/libimagtimeui/src/lib.rs b/libimagtimeui/src/lib.rs index 2ec7af12..2d527f50 100644 --- a/libimagtimeui/src/lib.rs +++ b/libimagtimeui/src/lib.rs @@ -6,4 +6,5 @@ extern crate regex; #[macro_use] extern crate libimagerror; pub mod date; +pub mod time; diff --git a/libimagtimeui/src/time.rs b/libimagtimeui/src/time.rs new file mode 100644 index 00000000..7da49971 --- /dev/null +++ b/libimagtimeui/src/time.rs @@ -0,0 +1,34 @@ +use chrono::naive::time::NaiveTime as ChronoNaiveTime; + +use parse::Parse; + +pub struct Time { + hour: u32, + minute: u32, + second: u32, +} + +impl Time { + + fn new(hour: u32, minute: u32, second: u32) -> Time { + unimplemented!() + } + +} + +impl Into for Time { + + fn into(self) -> ChronoNaiveTime { + ChronoNaiveTime::from_hms(self.hour, self.minute, self.second) + } + +} + +impl Parse for Time { + + fn parse(s: &str) -> Option