Spec-Zone.ru › ColdFusion

month

Extracts the month value from a date/time object.

month(date) → returns numeric

Member Function Syntax

date.month()

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: hour minute second quarter week year

    Argument Reference

    date date
    Required

    Compatibility

    ColdFusion:

    Member function is available in CF11+.

    Lucee:

    Member function is available in Lucee4.5+.

    Examples
    Sample code invoking the month function

    Month of a datetime object

    dt = createdatetime(2016,1,1,5,30,25);
    m = month( dt );
    writeoutput( m );

    Expected Result: 1

    Month using member syntax

    Returns the month from a datetime object

    createDate( 2022, 10, 1 ).month();

    Expected Result: 10

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

    Spec-Zone.ru

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