
374
DEVELOPING
COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Las
t
upda
te
d 8/5/2010
<!--- This example shows LSDateFormat --->
<html>
<head>
<title>LSDateFormat Example</title>
</head>
<body>
<h3>LSDateFormat Example</h3>
<p>Format the date part of a date/time value using the locale convention.
<!--- loop through a list of locales; show date values for Now()--->
<cfloop list = "#Server.Coldfusion.SupportedLocales#"
index = "locale" delimiters = ",">
<cfset oldlocale = SetLocale(locale)>
<cfoutput><p><B><I>#locale#</I></B><br>
#LSDateFormat(Now(), "mmm-dd-yyyy")#<br>
#LSDateFormat(Now(), "mmmm d, yyyy")#<br>
#LSDateFormat(Now(), "mm/dd/yyyy")#<br>
#LSDateFormat(Now(), "d-mmm-yyyy")#<br>
#LSDateFormat(Now(), "ddd, mmmm dd, yyyy")#<br>
#LSDateFormat(Now(), "d/m/yy")#<br>
#LSDateFormat(Now())#<br>
<hr noshade>
</cfoutput>
</cfloop>
</body>
</html>
Additional globalization tags and functions
In addition to the tags and functions that are specifically for globalized applications, you might find the following
useful when writing a globalized application:
•
All string manipulation functions. For more information, see the String functions list in ColdFusion Functions in
the
CFML Reference
.
•
The
GetTimeZoneInfo
function, which returns the time zone of the operating system.
Handling data in ColdFusion
Many of the issues involved with globalizing applications deal with processing data from the various sources supported
by ColdFusion, including the following:
•
General character encoding issues
•
Locale-specific content
•
Input data from URLs and HTML forms
•
File data
•
Databases
•
•
HTTP
•
LDAP
•
WDDX
•
COM
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...