Re: [xslt] Troubles with the EXSLT date extensions



The date:difference() bugs are now hopefully fixed. I also took the liberty
to eliminate some type conversion warnings.

I decided not to modify the format function, but the implementation of
date:difference. That I did because a general solution in the format
function would require floating point division, rounding to integer and what
not. That could be avoided in the date:difference implementation, where the
problem is solved by using addition and subtraction only. We always have
better results when we do not involve machine-precision errors too much. So
is now
  x = 2002-01-01T23:59:59.123456789
  y = 2002-01-02T00:00:00.123456789
  d = PT1S
what would probably result in some weird fractional d, had we modified the
format function.

Modifications are limited to libexslt/date.c. The changes are commited.

Ciao
Igor




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]