Impl Date

This commit is contained in:
Matthias Beyer 2016-05-28 20:21:42 +02:00
parent fbb576d51a
commit 4ea0b98cc2

View file

@ -10,8 +10,24 @@ pub struct Date {
impl Date { impl Date {
fn new(year: i32, month: u32, day: u32) -> Date { pub fn new(year: i32, month: u32, day: u32) -> Date {
unimplemented!() Date {
year: year,
month: month,
day: day,
}
}
pub fn year(&self) -> i32 {
self.year
}
pub fn month(&self) -> u32 {
self.month
}
pub fn day(&self) -> u32 {
self.day
} }
} }