diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-05-28 20:21:42 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-05-28 20:53:30 +0200 |
commit | 4ea0b98cc28a0504d35108b3bf539bb47ed995e6 (patch) | |
tree | ebd35e415d08d33feccc535fd721b59839793547 /libimagtimeui | |
parent | fbb576d51a6a0dc71de45fce17fdd0409400ca54 (diff) |
Impl Date
Diffstat (limited to 'libimagtimeui')
-rw-r--r-- | libimagtimeui/src/date.rs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/libimagtimeui/src/date.rs b/libimagtimeui/src/date.rs index ea28479c..fb2e57cc 100644 --- a/libimagtimeui/src/date.rs +++ b/libimagtimeui/src/date.rs @@ -10,8 +10,24 @@ pub struct Date { impl Date { - fn new(year: i32, month: u32, day: u32) -> Date { - unimplemented!() + pub fn new(year: i32, month: u32, day: u32) -> Date { + 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 } } |