Lsiscurrency - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

LSIsCurrency

Description
Determines whether a string is a valid representation of a currency amount in the current locale.
Returns
True, if the parameter is formatted as a valid currency amount, including the appropriate currency
indicator. Returns True for amounts in the local, international, or none currency formats.
Category
Display and formatting
Function syntax
LSIsCurrency(string)
See also
GetLocale, SetLocale,
History
ColdFusion MX: Changed formatting behavior: this function might return a different result than
in earlier releases. This function uses Java standard locale formatting rules on all platforms; the
results might vary depending upon the JVM; for example, Sun JVM 1.4.1 requires euro format
the local currency if the current locale's country belongs to the Euro Zone.
Parameters
Parameter
string
Usage
For examples of ColdFusion code and output that shows differences between earlier ColdFusion
releases and ColdFusion MX in accepting input formats and displaying output, see
LSCurrencyFormat
Note: If the locale belongs to a Euro zone country and the currency is a correctly formatted euro value
for the locale, this function returns True for all JVMs, including Sun 1.3.1. As a result, with 1.3.1-
compliant JVMs, the LSIsCurrency function does not ensure that
If a currency uses the older country-specific format for Euro Zone locales, the LSIsCurrency function
False for newer JVMs, such as Sun 1.4.1 and True for older JVMs, such as Sun 1.3.1.
Note: To set the default display format of date, time, number, and currency values, use the
SetLocale
function.
Example
<h3>LSIsCurrency Example</h3>
<cfif IsDefined("FORM.locale")>
<!--- if locale is defined, set locale to that entry --->
<cfset NewLocale = SetLocale(FORM.locale)>
<p>Is the value "<cfoutput>#FORM.myValue#</cfoutput>"
a proper currency value for <cfoutput>#GetLocale()#</cfoutput>?
<p>Answer: <cfoutput>#LSIsCurrency(FORM.myValue)#</cfoutput>
</cfif>
functions,
Decision
LSCurrencyFormat
Description
A currency string or a variable that contains one.
on page 597
.
functions,
International functions
LSParseCurrency
returns a value.
LSIsCurrency
605

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents