quarter

Calculates the quarter of the year in which a date falls.

quarter(date) → returns Numeric

Member Function Syntax

date.quarter()

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


Quarter of a datatime object

dt = createdatetime(2016,1,1,5,30,25);
q = quarter( dt );
writeoutput( q );

Expected Result: 1


Fork me on GitHub