Name
LSTimeFormat
Synopsis
LSTimeFormat(time
[,mask
])
Returns locale-specific time
formatted
according to mask
. If no value is
specified for mask
, LSTimeFormat( )
uses the default locale’s format. Valid entries for
mask
are the same as for
TimeFormat( )
. The following example demonstrates
for each locale:
<CFSET TheTime = Now( )> <CFLOOP INDEX="locale" LIST="#Server.Coldfusion.SupportedLocales#"> <CFSET temp = SetLocale(locale)> <CFOUTPUT> <P><B>#locale#</B><BR> TheTime = #LSTimeFormat(TheTime)#<BR> LSTimeFormat(TheTime, 'h:m:s'): #LSTimeFormat(TheTime, 'h:m:s')#<BR> LSTimeFormat(TheTime, 'h:m:s t'): #LSTimeFormat(TheTime, 'h:m:s t')#<BR> LSTimeFormat(TheTime, 'hh:mm:ss'): #LSTimeFormat(TheTime, 'hh:mm:ss')#<BR> LSTimeFormat(TheTime, 'hh:mm:ss tt'): #LSTimeFormat(TheTime, 'hh:mm:ss tt')#<BR> LSTimeFormat(TheTime, 'H:M:ss'): #LSTimeFormat(TheTime, 'H:M:s')#<BR> LSTimeFormat(TheTime, 'HH:MM:ss'): #LSTimeFormat(TheTime, 'HH:MM:ss')#<BR> </CFOUTPUT> </CFLOOP>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.