Lsisdate - MACROMEDIA COLDFUSION MX 61-CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

LSIsDate

Description
Determines whether a string is a valid representation of a date/time value in the current locale.
Returns
True, if the string can be formatted as a date/time value in the current locale; False, otherwise.
Category
Date and time
functions,
Function syntax
LSIsDate(string)
See also
CreateDateTime, GetLocale, IsNumericDate, LSDateFormat, ParseDateTime,
SetLocale
History
ColdFusion MX:
Changed formatting behavior: this function might return a different result than in earlier
releases. This function uses Java standard locale formatting rules on all platforms.
Changed behavior: this function accepts a dash or hyphen character only in the
Dutch(Standard) and Portuguese (Standard) locales. If called this way (for example,
LsIsDate("3-1-2002") in any other locale, this function returns False. (Earlier releases returned
True.)
Changed behavior: when using the SUN JRE 1.3.1 on an English(UK) locale, this function
returns False for a date that has a one-digit month or day (for example, 1/1/01). To work
around this, insert a zero in a one-digit month or day (for example, 01/01/01).
Parameters
Parameter
string
Usage
A date/time object is in the range 100 AD–9999 AD.
To set the default display format of date, time, number, and currency values, use the
function.
Example
<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">
<p>Select a locale for which you would like to check a date value:
Display and formatting
Description
A string or a variable that contains one
functions,
International functions
SetLocale
LSIsDate
607

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents