Skip to content

Commit 2156e6a

Browse files
antoniosanctlukasj
authored andcommitted
fix #242
Signed-off-by: Antonio Santos Izaguirre <[email protected]>
1 parent c87d01c commit 2156e6a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/src/main/asciidoc/ch07-customize_xml_schema.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//
2-
// Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
2+
// Copyright (c) 2020, 2024 Contributors to the Eclipse Foundation
33
//
44

55
== Customizing XML Schema to Java Representation Binding
@@ -2072,14 +2072,14 @@ print and parse methods.
20722072
package pkg;
20732073
import jakarta.xml.bind.DatatypeConverter;
20742074
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;
20792079
}
20802080
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);
20832083
}
20842084
}
20852085
----

0 commit comments

Comments
 (0)