summaryrefslogtreecommitdiffstats
path: root/libimagtimeui
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2016-05-28 20:21:42 +0200
committerMatthias Beyer <mail@beyermatthias.de>2016-05-28 20:53:30 +0200
commit4ea0b98cc28a0504d35108b3bf539bb47ed995e6 (patch)
treeebd35e415d08d33feccc535fd721b59839793547 /libimagtimeui
parentfbb576d51a6a0dc71de45fce17fdd0409400ca54 (diff)
Impl Date
Diffstat (limited to 'libimagtimeui')
-rw-r--r--libimagtimeui/src/date.rs20
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
}
}