From: luukkainen Date: Thu, 10 Nov 2016 08:37:27 +0000 (+0000) Subject: Date/Time toString() methods X-Git-Tag: v1.31.0~52 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=53437c09b34c51c21408f4332eb8b6d7f85dd8d4;p=simantics%2Finterop.git Date/Time toString() methods refs #6801 git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@33383 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Date.java b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Date.java index 8f0f2c2..d551d11 100644 --- a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Date.java +++ b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Date.java @@ -99,5 +99,10 @@ public class Date extends Bean implements org.simantics.xml.sax.base.datatypes.a } + @Override + public String toString() { + return year + "-" + month + "-"+day; + } + } diff --git a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/DateTime.java b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/DateTime.java index ba50b20..a7c8ad6 100644 --- a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/DateTime.java +++ b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/DateTime.java @@ -130,5 +130,10 @@ public class DateTime extends Bean implements org.simantics.xml.sax.base.datatyp throw new IllegalArgumentException("Time is not in proper format " + dateString); } + + @Override + public String toString() { + return year + "-" + month + "-"+day + "T"+hours+ ":" + minutes + ":"+seconds; + } } diff --git a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Time.java b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Time.java index 03b3911..333f4a3 100644 --- a/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Time.java +++ b/org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Time.java @@ -104,5 +104,10 @@ public class Time extends Bean implements org.simantics.xml.sax.base.datatypes.a throw new IllegalArgumentException("Time is not in proper format " + timeString); } + + @Override + public String toString() { + return hours+ ":" + minutes + ":"+seconds; + } }