Closed ohralathe closed 6 years ago
Thanks for pointing that out. The error was in the conversion from GregorianCalendar
to XMLGregorianCalendar
for the date only.
GregorianCalendar
has a month range from 0 to 11 whereas XMLGregorianCalendar
has a range from 1 to 12 and I missed this in PDTXMLConverter.getXMLCalendarDate (GregorianCalendar)
Firstly, thank you @phax because of your useful library, It saved my time a lot. I see a method in you util method return a value maybe incorrect.
Phenomenon
PDTXMLConverter.getXMLCalendarDate(new Date(2018-10-31)) return 2018-09-31
Steps to reproduce
it return the value with
2018-09-31
I solved by pass a LocalDate argument instead of Date.
Expected
I think the return of these overload methods should be the same with PDTXMLConverter.getXMLCalendarDate(LocalDate localDate);