Add DateTime type

This commit is contained in:
Matthias Beyer 2016-05-28 17:53:29 +02:00
parent ef81d87d94
commit cc448e4754
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,35 @@
use chrono::naive::datetime::NaiveDateTime as ChronoNaiveDateTime;
use parse::Parse;
use date::Date;
use time::Time;
pub struct DateTime {
date: Date,
time: Time,
}
impl DateTime {
fn new(date: Date, time: Time) -> DateTime {
unimplemented!()
}
}
impl Into<ChronoNaiveDateTime> for DateTime {
fn into(self) -> ChronoNaiveDateTime {
ChronoNaiveDateTime::new(self.date.into(), self.time.into())
}
}
impl Parse for DateTime {
fn parse(s: &str) -> Option<DateTime> {
unimplemented!()
}
}

View file

@ -6,5 +6,6 @@ extern crate regex;
#[macro_use] extern crate libimagerror;
pub mod date;
pub mod datetime;
pub mod time;