dayOfYear

Determines the day of the year, in a date.

dayOfYear(date) → returns Numeric

Member Function Syntax

date.dayOfYear()

dayOfYear 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 dayOfYear function


Determines the day of the year

Uses the dayOfYear function to determine the day of the year

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

Expected Result: 365


Fork me on GitHub