home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / lsparsecurrency.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  890 b   |  37 lines

  1. <!--- This shows LSParseCurrency --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>LSParseCurrency Example</TITLE>
  7. </HEAD>
  8.  
  9. <BODY>
  10.  
  11. <H3>LSParseCurrency Example</H3>
  12.  
  13. <P>LSParseCurrency coverts a local-specific currency
  14. string to a number.  Attempts conversion through each of
  15. the three default currency formats.
  16.  
  17. <!--- loop through a list of possible locales and
  18. show currency values for 123,456 units --->
  19. <CFLOOP LIST="#Server.Coldfusion.SupportedLocales#"
  20. INDEX="locale" DELIMITERS=",">
  21.     <CFSET oldlocale = SetLocale("#locale#")>
  22.  
  23.     <CFOUTPUT><P><B><I>#locale#</I></B><BR>
  24.         Local: #LSCurrencyFormat(123456, "local")#<BR>
  25.         Currency Number: #LSParseCurrency(LSCurrencyFormat(123456,"local"))#<BR>
  26.         International: #LSCurrencyFormat(123456, "international")#<BR>
  27.         None: #LSCurrencyFormat(123456, "none")#<BR>
  28.         <hr noshade>
  29.     </CFOUTPUT>
  30.  
  31. </CFLOOP>
  32.  
  33.  
  34.  
  35. </BODY>
  36. </HTML>       
  37.