Jim,

For Boolean, you could do something like:

<cfif isBoolean(String) and (listFindNoCase("true,false", String) GT 0)>

</cfif>

You could change the isBoolean() and use isSimpleValue() instead if you
think it provides better performance. Not sure if one provides better
performance over the other.

-Dan

>-----Original Message-----
>From: Jim Davis [mailto:[EMAIL PROTECTED]
>Sent: Monday, September 26, 2005 12:39 AM
>To: CF-Talk
>Subject: RE: Best way of determining CF Datatypes
>
>Well... this is what I've come up with "Date", at least:
>
><cfif IsDate(Date1) AND        REFindNoCase("^\{ts
'[0-9]{4}-[0-9]{2}-[0-9]{2}
>[0-9]{2}:[0-9]{2}:[0-9]{2}'\}$", Date1)>
>
>I'm saying "if you think it's a date AND if it matches the timestamp format
>for a native CF date".
>
>So, for these two:
>
><cfset Date1 = "Mar 03, 2005" />
><cfset Date2 = Now() />
>
>The first will not match, but the second (which is the format "{ts
>'2005-09-26 00:36:09'}") will.
>
>This way only "real" CF dates will be treated as such by the XML parser,
>not
>strings which might be dates.
>
>I'm still working on how to best deal with Booleans and numbers.
>
>Jim Davis
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219373
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to