[ODFPlugtest] OpenFormula TIME function
Hanssens Bart
Bart.Hanssens at fedict.be
Sun May 20 21:26:48 CEST 2012
Hi,
Andreas Guelzow spotted an issue with TIME(), when input > 24h
The ODF 1.2 spec states
"6.10.17 TIME
...
Returns the fraction of the day consumed by the given time, i.e.:
((hours*60*60) + (minutes*60) + seconds) / (24*60*60)
...
Hours, minutes, and seconds may be any number
(they shall not be limited to the ranges 0..24, 0..59, or 0..60 respectively)"
Gnumeric implements this correctly, but e.g. OpenOffice 3.4 release notes says:
"Spreadsheet: TIME function returns values 00:00:00 <= x <= 23:59:59.999
The TIME spreadsheet function returns values between 00:00:00 and 23:59:59.999...
inclusive and wraps values equal to or greater than 24:00:00."
It would be interesting to know if the issue is also present in other products.
A test file can be downloaded from the OASIS OIC TC repository
http://www.oasis-open.org/committees/document.php?document_id=46062&wg_abbrev=oic
Best regards
Bart
More information about the Plugtest
mailing list