Functions, operators, and data types for XPath 3.1

The implementation of xs:duration and xs:dayTimeDuration has changed so the seconds component (representing the number of days, hours, minutes, and seconds) is now held internally as a BigDecimal value. This affects the range of values and precision that can be maintained (both are now essentially unlimited), and prevents arithmetic exceptions when manipulating extremely large or small values. The change also affects the internal APIs for constructing and manipulating instances of these two types.

The months component is unaffected: the total number of months in a duration remains limited to 2^31.

Similarly, the seconds value in an xs:dateTime or xs:time value is now held as a BigDecimal, meaning there is effectively no limit on the precision of fractional seconds. Previously this value was held as an integer number of seconds plus an integer number of nanoseconds. Again, this is reflected in changes to some low-level interfaces.