]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Date/Time toString() methods
authorluukkainen <luukkainen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 10 Nov 2016 08:37:27 +0000 (08:37 +0000)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 2 Feb 2017 12:01:35 +0000 (14:01 +0200)
refs #6801

git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@33383 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Date.java
org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/DateTime.java
org.simantics.xml.sax.base/src/org/simantics/xml/sax/base/datatypes/literal/Time.java

index 8f0f2c2bbcff9d64b28eecf20c04afda249821c7..d551d117133b47f583d2437e21fe04784fba02fe 100644 (file)
@@ -99,5 +99,10 @@ public class Date extends Bean implements org.simantics.xml.sax.base.datatypes.a
                \r
        }\r
        \r
+       @Override\r
+       public String toString() {\r
+               return year + "-" + month + "-"+day;\r
+       }\r
+       \r
        \r
 }\r
index ba50b20a254dc382ff2fc25b39b780874f7bb3d5..a7c8ad64c807289ba0bcc05877ab304e07e88262 100644 (file)
@@ -130,5 +130,10 @@ public class DateTime extends Bean implements org.simantics.xml.sax.base.datatyp
 \r
                throw new IllegalArgumentException("Time is not in proper format " + dateString);\r
        }\r
+       \r
+       @Override\r
+       public String toString() {\r
+               return year + "-" + month + "-"+day + "T"+hours+ ":" + minutes + ":"+seconds;\r
+       }\r
 \r
 }\r
index 03b391173e36cd4a5c154732310197079f96ad43..333f4a3de1a5a782fdfdee99ca0af9192690d604 100644 (file)
@@ -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);\r
                \r
        }\r
+       \r
+       @Override\r
+       public String toString() {\r
+               return hours+ ":" + minutes + ":"+seconds;\r
+       }\r
 \r
 }\r