Skip to content

Commit

Permalink
fix #242
Browse files Browse the repository at this point in the history
Signed-off-by: Antonio Santos Izaguirre <antoniosanct@gmail.com>
  • Loading branch information
antoniosanct authored and lukasj committed Feb 17, 2024
1 parent c87d01c commit 2156e6a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions spec/src/main/asciidoc/ch07-customize_xml_schema.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2020, 2023 Contributors to the Eclipse Foundation
// Copyright (c) 2020, 2024 Contributors to the Eclipse Foundation
//

== Customizing XML Schema to Java Representation Binding
Expand Down Expand Up @@ -2072,14 +2072,14 @@ print and parse methods.
package pkg;
import jakarta.xml.bind.DatatypeConverter;
public class MyDatatypeConverter {
public static long myParseDate(String s) {
java.util.Calendar d = DatatypeConverter.parse(s);
long result= cvtCalendarToLong(d) ; // userdefined method
return result;
public static long myParseDate(String s) {
java.util.Calendar d = DatatypeConverter.parseDateTime(s);
long result = cvtCalendarToLong(d) ; // user defined method
return result;
}
public static String myPrintDate(long l) {
java.util.Calendar d = cvtLongToCalendar(l);//user defined
return DatatypeConverter.print(d);
java.util.Calendar d = cvtLongToCalendar(l); //user defined method
return DatatypeConverter.printDateTime(d);
}
}
----
Expand Down

0 comments on commit 2156e6a

Please sign in to comment.