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

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( ). If an invalid mask is passed to the function, ColdFusion outputs the invalid characters. The following example demonstrates for each locale:

<cfset TheTime = Now( )>
   
<cfloop index="locale" list="#Server.Coldfusion.SupportedLocales#">
  <cfset 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>
    <p>
    And these formats are new in ColdFusion MX:<br>
    shor....

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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