LSIsDate
757
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
,
Display and formatting functions
,
International functions
Function syntax
LSIsDate
(
string
)
See also
CreateDateTime
,
GetLocale
,
IsNumericDate
,
LSDateFormat
,
ParseDateTime
,
SetLocale
;
“Handling data in ColdFusion MX” in Chapter 17, “Developing Globalized Applications,” in
ColdFusion MX Developer’s Guide
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
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
SetLocale
function.
Example
<h3>LSIsDate Example</h3>
<cfif IsDefined("FORM.locale")>
<!--- if locale is defined, set locale to that entry --->
<cfset NewLocale = SetLocale(FORM.locale)>
Parameter
Description
string
A string or a variable that contains one
Summary of Contents for COLFUSION MX 7 - INSTALLING AND USING COLDFUSION MX
Page 1: ...COLDFUSION MX7 CFML Reference...
Page 20: ...20 Chapter 1 Reserved Words and Variables...
Page 50: ...50 Chapter 2 ColdFusion Tags cfelse br Searching cfif cfloop cfif...
Page 101: ...cfdefaultcase 101 cfdefaultcase cfswitch cfoutput Your grade is grade cfoutput...
Page 115: ...cfdocumentsection 115 cfdocumentsection cfoutput cfdocument...
Page 411: ...cftable 411 cftable body html...
Page 515: ...Chr 515 maxlength 5 p input type Submit name input type RESET cfform...
Page 605: ...GetEncoding 605 WriteOutput The encoding is theEncoding cfscript cfif...
Page 629: ...GetProfileString 629 tr td input type Submit name Submit value Submit td td td tr table form...
Page 655: ...IIf 655 cfoutput IIf Hour Now GTE 12 DE It is afternoon or evening DE It is morning cfoutput b...
Page 664: ...664 Chapter 3 ColdFusion Functions cfelse h3 Conversion error h3 cfif...
Page 687: ...IsStruct 687 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 751: ...LSDateFormat 751 hr noshade cfoutput cfloop...
Page 861: ...StructFind 861 cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 903: ...Val 903 value Is the beginning numeric name form...
Page 932: ...932 Chapter 3 ColdFusion Functions...
Page 944: ...944 Chapter 4 ColdFusion MX Flash Form Style Reference...
Page 962: ...962 Chapter 5 Application CFC Reference...
Page 1054: ...1054 Chapter 6 ColdFusion MX Event Gateway Reference...