Spec-Zone.ru › ColdFusion

firstDayOfMonth

Determines the ordinal (day number, in the year) of the first day of the month in which a given date falls.

firstDayOfMonth(date) → returns numeric

Member Function Syntax

date.firstDayOfMonth()

  • CF
  • Lucee
  • BL 1.0.0+
  • See Also: day dayOfWeek dayOfWeekAsString dayOfYear daysInMonth daysInYear

    Argument Reference

    date date
    Required

    Date or date/time object.

    Compatibility

    ColdFusion:

    Member function is available in CF11+.

    Lucee:

    Member function is available in Lucee4.5+.

    Examples
    Sample code invoking the firstDayOfMonth function

    Simple example

    To determine the ordinal (day number, in the year).

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

    Expected Result: 336

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

    Spec-Zone.ru

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