Determines the number of days in a year.
daysInYear(date)
→ returns numeric
date.daysInYear()
timezone
parameter.
Member function is available in Lucee4.5+.
Uses the daysInYear function to determine the number of days in a year
<cfset Date = CreateDate(2023, 06, 18)>
<cfset result = daysInYear(Date)>
<cfoutput>#result#</cfoutput>
Expected Result: 365
To determine the number of days in a year
<cfset Date = CreateDate(2012, 02, 03)>
<cfset result = daysInYear(Date)>
<cfoutput>#result#</cfoutput>
Expected Result: 366
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.