<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>3163</bug_id>
          
          <creation_ts>2006-04-27 21:38:56 +0000</creation_ts>
          <short_desc>[XSLT 2.0] format-time(): an oddity with fractional seconds</short_desc>
          <delta_ts>2006-05-03 21:19:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XSLT 2.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Michael Kay">mike</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>9517</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2006-04-27 21:38:56 +0000</bug_when>
    <thetext>This issue has been discussed by email within the Working Group: this bug is being raised to capture the issue and its resolution.

The issue is this:

The default presentation modifier for &quot;f&quot; (fractional seconds) is &quot;1&quot;.

We say:

A format token containing leading zeroes, such as 001, sets the minimum and
maximum width to the number of digits appearing in the format token; if a
width modifier is also present, then the width modifier takes precedence.

So the format token &quot;1&quot; doesn&apos;t set a minimum or maximum width (because it
contains no leading zeroes).

It&apos;s a little odd that f001 gives you fractional seconds to three places,
f01 to two places, and f1 to however many places the system fancies. But
since &quot;1&quot; is the default this is just as well. If you want exactly one
decimal place you have to write [f,1-1].

Resolution:

We agreed that although the effect might be a little surprising, the user could always achieve what they wanted with an explicit width specifier, and it would be undesirable to introduce new syntax incompatible with xsl:number. The editor was asked to draft a Note to add to the spec. The proposed Note is as follows: in 16.5.1, after the paragraph

&quot;A format token containing leading zeroes, such as 001, sets the minimum and maximum width to the number of digits appearing in the format token; if a width modifier is also present, then the width modifier takes precedence.&quot;

add

&quot;Note: a format token consisting of a one-digit on its own, such as &quot;1&quot;, does not constrain the number of digits in the output. In the case of fractional seconds in particular, [f001] requests three decimal digits, [f01] requests two digits, but [f1] will produce an implementation-defined number of digits. If exactly one digit is required, this can be achieved using the component specifier [f1,1-1]&quot; 

This change has been applied.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>