User Tools

Site Tools


en:public:developer:template_system:tags:parameters:format

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:developer:template_system:tags:parameters:format [2013/01/27 21:32]
admin old revision restored (2012/11/29 07:29)
en:public:developer:template_system:tags:parameters:format [2016/04/07 17:18] (current)
svanderclock
Line 5: Line 5:
 the value is manipulated into the returned string.  the value is manipulated into the returned string. 
    
 +**NOTE:** By default the resulting content and the content of the parameter "Format", "DecimalSeparator", 
 +"ThousandSeparator" will be parsed (all <#..> tags will be evaluated) before to apply this filter. 
 +You can control this behavior throught the parameter 
 +[[en:public:developer:template_system:tags:parameters:AnalyzeTagParams]]
 +
 The Formatting string can comprise a mix of ordinary characters (that are passed unchanged  The Formatting string can comprise a mix of ordinary characters (that are passed unchanged 
 to the result string), and data formatting characters. This formatting is best  to the result string), and data formatting characters. This formatting is best 
Line 10: Line 15:
 of the following :  of the following : 
  
 +| <html><span style="color:#008000"><nobr><b>%</b><b>b</b></nobr></span></html> | Boolean | The argument must be an integer or boolean value. The value is converted to a boolean string using the [[en:public:developer:template_system:tags:parameters:TrueStr]] and [[en:public:developer:template_system:tags:parameters:FalseStr]] params. |
 | <html><span style="color:#008000"><nobr><b>%</b><span style="color:blue">[-][width][.prec]</span><b>d</b></nobr></span></html> | Decimal | The argument must be an integer value. The value is converted to a string of decimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has less digits, the resulting string is left-padded with zeros. A width specifier sets the minimum field width for a conversion. If the resulting string is shorter than the minimum field width, it is padded with blanks to increase the field width. The default is to right-justify the result by adding blanks in front of the value, but if the format specifier contains a left-justification indicator (an "-" en dash character preceding the width specifier), the result is left-justified by adding blanks after the value.| | <html><span style="color:#008000"><nobr><b>%</b><span style="color:blue">[-][width][.prec]</span><b>d</b></nobr></span></html> | Decimal | The argument must be an integer value. The value is converted to a string of decimal digits. If the format string contains a precision specifier, it indicates that the resulting string must contain at least the specified number of digits; if the value has less digits, the resulting string is left-padded with zeros. A width specifier sets the minimum field width for a conversion. If the resulting string is shorter than the minimum field width, it is padded with blanks to increase the field width. The default is to right-justify the result by adding blanks in front of the value, but if the format specifier contains a left-justification indicator (an "-" en dash character preceding the width specifier), the result is left-justified by adding blanks after the value.|
 | <html><span style="color:#008000"><nobr><b>%</b><span style="color:blue">[-][width][.prec]</span><b>u</b></nobr></span></html> | Unsigned decimal | Similar to d, but no sign is output. A width specifier sets the minimum field width for a conversion. If the resulting string is shorter than the minimum field width, it is padded with blanks to increase the field width. The default is to right-justify the result by adding blanks in front of the value, but if the format specifier contains a left-justification indicator (an "-" en dash character preceding the width specifier), the result is left-justified by adding blanks after the value.| | <html><span style="color:#008000"><nobr><b>%</b><span style="color:blue">[-][width][.prec]</span><b>u</b></nobr></span></html> | Unsigned decimal | Similar to d, but no sign is output. A width specifier sets the minimum field width for a conversion. If the resulting string is shorter than the minimum field width, it is padded with blanks to increase the field width. The default is to right-justify the result by adding blanks in front of the value, but if the format specifier contains a left-justification indicator (an "-" en dash character preceding the width specifier), the result is left-justified by adding blanks after the value.|
Line 104: Line 110:
         format given by the LongTimeFormat parameter. The time is not displayed if          format given by the LongTimeFormat parameter. The time is not displayed if 
         the date-time value indicates midnight precisely.</td>         the date-time value indicates midnight precisely.</td>
 +  </tr>
 +    <tr>
 +    <td>f</td>
 +    <td>Displays the date as a float number.</td>
   </tr>   </tr>
   <tr>   <tr>
en/public/developer/template_system/tags/parameters/format.1359307935.txt.gz ยท Last modified: 2013/01/27 21:32 by admin