File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
//
2
- // Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
2
+ // Copyright (c) 2020, 2024 Contributors to the Eclipse Foundation
3
3
//
4
4
5
5
== Customizing XML Schema to Java Representation Binding
@@ -2072,14 +2072,14 @@ print and parse methods.
2072
2072
package pkg;
2073
2073
import jakarta.xml.bind.DatatypeConverter;
2074
2074
public class MyDatatypeConverter {
2075
- public static long myParseDate(String s) {
2076
- java.util.Calendar d = DatatypeConverter.parse (s);
2077
- long result= cvtCalendarToLong(d) ; // userdefined method
2078
- return result;
2075
+ public static long myParseDate(String s) {
2076
+ java.util.Calendar d = DatatypeConverter.parseDateTime (s);
2077
+ long result = cvtCalendarToLong(d) ; // user defined method
2078
+ return result;
2079
2079
}
2080
2080
public static String myPrintDate(long l) {
2081
- java.util.Calendar d = cvtLongToCalendar(l);//user defined
2082
- return DatatypeConverter.print (d);
2081
+ java.util.Calendar d = cvtLongToCalendar(l); //user defined method
2082
+ return DatatypeConverter.printDateTime (d);
2083
2083
}
2084
2084
}
2085
2085
----
You can’t perform that action at this time.
0 commit comments