Spec-Zone.ru › ColdFusion

isDate

Determines whether a string or Java object can be converted to a date/time value.

isDate(Object) → returns boolean

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: CreateDateTime IsNumericDate IsValid LSDateFormat LSIsDate ParseDateTime

    Argument Reference

    Object any
    Required

    A string or variable name

    Examples
    Sample code invoking the isDate function

    Simple example

    To determine whether a string can be converted to a date/time value.

    <cfset Date = CreateDate(2012, 12, 12)>
    <cfset result = isDate(Date)>
    <cfoutput>#result#</cfoutput>

    Expected Result: Yes

    Simple example

    To determine whether a string can be converted to a date/time value.

    <cfset result = isDate("Date")>
    <cfoutput>#result#</cfoutput>

    Expected Result: No

    © 2012–present Foundeo, Inc. and the CFDocs contributors.
    Licensed under the MIT License.
    ColdFusion is a trademark of Adobe Systems Incorporated.
    https://cfdocs.org/isdate

    Spec-Zone.ru

    Настройки Оффлайн Что нового Помощь О нас
    Spec-Zone .ru
    спецификации, руководства, описания, API