elharo opened a new pull request, #125:
URL: https://github.com/apache/xerces-j/pull/125

   Fixes [XERCESJ-1588](https://issues.apache.org/jira/browse/XERCESJ-1588).
   
   The canonical representation of an `xs:date` with a time zone dropped the 
time zone instead of appending the recoverable time zone. For example, 
`2004-01-01+11:00` was reported as `2004-01-01` rather than `2003-12-31-13:00`.
   
   Per [XML Schema Part 2, section 
3.2.9.2](https://www.w3.org/TR/xmlschema-2/#date-canonical-representation), the 
date portion of the canonical representation is the date portion of the 
interval midpoint, and the canonical recoverable time zone (which is in the 
range `+12:00` to `-11:59`) is appended.
   
   Changes:
   - `DateDV` now normalizes date values using noon as the time of day, so 
normalizing the time zone yields the canonical date portion.
   - `DateDV.dateToString` emits the recoverable time zone, wrapping the 
original offset and adjusting the date as needed.
   - Adds `TestDateDV` covering offsets that require wrapping, including 
`+14:00`, `-14:00`, and fractional-hour offsets.
   
   `ant test` passes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to