<!--- This example shows LSIsDate --->

<HTML>
<HEAD>
<TITLE>LSIsDate Example</TITLE>
</HEAD>

<BASEFONT FACE="Arial, Helvetica" SIZE=2>
<BODY  bgcolor="#FFFFD5">

<H3>LSIsDate 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 date value for <CFOUTPUT>#GetLocale()#</CFOUTPUT>?

<P>Answer: <CFOUTPUT>#LSIsDate(form.myValue)#</CFOUTPUT>
</CFIF>

<P>
<FORM ACTION="lsisdate.cfm" METHOD="POST">

<P>Select a locale for which you would like to check
a date value:

<!--- check the current locale for server --->
<CFSET serverLocale = GetLocale()>

<P><SELECT name="Locale">
<!--- loop through a list of possible locales and
display --->
<CFLOOP LIST="#Server.Coldfusion.SupportedLocales#" INDEX="locale" DELIMITERS=",">
	<CFSET oldlocale = SetLocale("#locale#")>
	<CFOUTPUT><OPTION value="#locale#" <CFIF locale is ServerLocale>SELECTED</CFIF>>#Locale#</CFOUTPUT>
</CFLOOP>
</SELECT>

<CFSET TheServerLocale = SetLocale(serverLocale)>
<P>Enter a date value
<P><INPUT TYPE="Text" NAME="MyValue" VALUE="<CFOUTPUT>#LSDateFormat(Now())#</CFOUTPUT>">
<P><INPUT TYPE="Submit" NAME="" VALUE="Is it a valid date entry?">

</FORM>

</BODY>

</HTML>       
