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()

firstDayOfMonth Argument Reference

date
Required

Date or date/time object.

Compatibility

ColdFusion:

Member function is available in CF 11+.

Lucee:

Member function is available in Lucee 4.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


Fork me on GitHub