isDateObject

Checks if the given value is a date / time object. The difference between isDateObject and isDate is that the latter returns true for date / time objects as well as date / time strings.

isDateObject(value) → returns boolean

This function requires Adobe ColdFusion 2016.0.3 and up.  Not supported on Lucee, etc.

Argument Reference

value any
Required

A value to test whether it's a date object

Examples
Sample code invoking the isDateObject function

<cfscript>
    date = IsDateObject(now());
    writeOutput("Can string be converted to a date/time value : " & date);
</cfscript>

Expected Result: Can string be converted to a date/time value : YES

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub