August 2001
Intermediate to advanced
976 pages
38h 8m
English
LSIsDate
LSIsDate(date)Functions identically to the IsDate( ) function
within the context of the current locale. Returns
True if date can be
converted to a date/time object in the current locale or
False if it can’t. The following example
determines whether the supplied values are valid date/time objects
for each locale:
<CFLOOP INDEX="locale" LIST="#Server.Coldfusion.SupportedLocales#">
<CFSET temp = SetLocale(locale)>
<CFOUTPUT>
<P><B>#locale#</B><BR>
08/15/1998: #LSIsDate('08/15/1998')#<BR>
15/08/1998: #LSIsDate('15/08/1998')#<BR>
13/13/1998: #LSIsDate('13/13/1998')#<BR>
August 15, 1998: #LSIsDate('August 15, 1998')#<BR>
15 Aug 1998: #LSIsDate('15 Aug 1998')#<BR>
7 p.m.: #LSIsDate('7 p.m.')#<BR>
7pm: #LSIsDate('7pm')#<BR>
19:00: #LSIsDate('19:00')#<BR>
six thirty: #LSIsDate('six thirty')#
</CFOUTPUT>
</CFLOOP>Read now
Unlock full access