• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Name

LSNumberFormat

Synopsis

                  LSNumberFormat(number [, mask])

Returns number formatted according to mask using the locale convention. If no value is specified for mask, LSNumberFormat( ) returns number rounded to the nearest integer. Valid entries for mask are the same as for NumberFormat( ). The following example applies the function to various numbers for each locale:

<cfloop index="locale" list="#Server.Coldfusion.SupportedLocales#">
  <cfset SetLocale(locale)>
  <cfoutput>
    <p><b>#locale#</b><br>
    LSNumberFormat(1000.99): #LSNumberFormat(1000.99)#<br>
    LSNumberFormat(1000.99, '____'): #LSNumberFormat(1000.99, '____')#<br>
    LSNumberFormat(1000.99, '9999.99'): #LSNumberFormat(1000.99, '9999.99')#<br>
    LSNumberFormat(1000.99, '09999.9900'): 
      #LSNumberFormat(1000.99, '09999.9900')#<br>
    LSNumberFormat(-1000.99, '(9999.99)'): 
      #LSNumberFormat(-1000.99, '(9999.99)')#<br>
    LSNumberFormat(1000.99, '+9999.99'): 
      #LSNumberFormat(1000.99, '+9999.99')#<br>
    LSNumberFormat(-1000.99, '+9999.99'): 
      #LSNumberFormat(-1000.99, '+9999.99')#<br>    
    LSNumberFormat(1000.....

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint