commit ae729fe7670f3fd55c5d63a98424a96d4564bf51
parent 3c6d9ee37c3cc9dbabe0b47a1906d196f0f56b98
Author: Dan Callaghan <djc@djc.id.au>
Date: Sun, 11 Oct 2009 16:41:31 +1000
for #year adaptation
Diffstat:
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/main/java/au/com/miskinhill/rdftemplate/datatype/Year.java b/src/main/java/au/com/miskinhill/rdftemplate/datatype/Year.java
@@ -14,6 +14,14 @@ public class Year {
this.year = date.getYear();
}
+ public Year(YearMonth yearMonth) {
+ this.year = yearMonth.getYear();
+ }
+
+ public int getYear() {
+ return year;
+ }
+
@Override
public String toString() {
return Integer.toString(year);
diff --git a/src/main/java/au/com/miskinhill/rdftemplate/datatype/YearMonth.java b/src/main/java/au/com/miskinhill/rdftemplate/datatype/YearMonth.java
@@ -17,6 +17,14 @@ public class YearMonth {
this.month = date.getMonthOfYear();
}
+ public int getYear() {
+ return year;
+ }
+
+ public int getMonth() {
+ return month;
+ }
+
@Override
public String toString() {
return String.format("%04d-%02d", year, month);