OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

oic message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [oic] TIME function in ODF vs OOXML


@Andreas,

You don't need the AMD.  If you want it anyhow, it can be found as SC34 document N1645.  It applies to ISO/IEC 29500-1:2011.  The text you are concerned about is not touched by the AMD.  As far as I can tell, the official ISO version has not been published yet, but N1645 is the approved document.

The two paragraphs that use a crude way of describing the [final] hour figure being taken mod 24 are in the unchanged text of OOXML.  I took those from the ECMA-676, Third Edition, Part 1.  This text is the same as in ISO/IEC 29500-1:2011 section 18.17.7.323 TIME without the most-recent AMD.  You can obtain either of those on-line without any fee.

It is clear that one needs to logically do the reductions on range from right to left (i.e., seconds, then minutes, then hours, where hours and minutes can have carries in from the units to the right).

This example confirms that, I trust:

  TIME(26,120,240) = 0.1694444444444560

The ODF definition matches this if the result, t, obtained using the formula in OpenFormula is then used to return  (t - floor(t)).

It would be useful to make that correction in the OOXML specification.  It takes care of the edge cases.  I think one can ignore problems of overflows beyond 32767 in the intermediate results as simply a problem for implementations to avoid [;<).

 - Dennis

-----Original Message-----
From: oic@lists.oasis-open.org [mailto:oic@lists.oasis-open.org] On Behalf Of Andreas J. Guelzow
Sent: Tuesday, May 22, 2012 18:48
To: oic@lists.oasis-open.org
Subject: RE: [oic] TIME function in ODF vs OOXML

On Tue, 2012-05-22 at 19:10 -0600, Dennis E. Hamilton wrote:
> I just checked the latest AMD for OOXML that I know about.  John is
> correct.  The only changes to the TIME function are to replace the
> phrase "serial value" with the term "serial date-time" (now introduced
> earlier in the strict specification).  
> 
> In unchanged text, OOXML strict says that truncated-hour mod 24 is
> used as the hour value, truncated-minutes over 59 will be changed to
> the corresponding number of hours and minutes, and truncated-seconds
> over 59 are converted to the corresponding number of hours, minutes,
> and seconds.  There's a prospective edge case in here, but I suspect
> hours are transformed to range 0 to less than 24 when it is all done.
> 
> The Return Type and Value are still a number, but its value is 0 <=
> result <= 1.  The only way to get to 1 is apparently via rounding.
> Parameters are out of range if less than 0 or not less than 32768.  

Hi Dennis,

where can I find this AMD? I am asking because reading this either there
are a whole bunch of mathematical no-ops here or the result value could
be outside the range 0 to 1.

Andreas

-- 
Andreas J. Guelzow, PhD, FTICA
Concordia University College of Alberta



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]