fq
This function identifies the financial (or fiscal) quarter of the date provided. Example: fq( "2022-02-01", 3 ) returns 4 because February lies in the 4th quarter in the fiascal year ending in March. If a blank date is provided, then 0 is returned.
Indirect parameter passing is disabled
2
No. | Type | Description |
---|---|---|
1 input |
date or string converted to date | Date Value to extract as described above |
2 input |
numeral | Month year ending Specify the last month of the financial year (Example: Specify 3 for fiscal years ending on 31. March every year). Value must be between 1 and 12. |
Type | Description |
---|---|
numeral string |
Result Quarter (1..4) |
date[] = "2022-05-01";
echo( "Date is ", date[] );
for (month[]=1, month[]<=12, month[]++ )
echo( "Year ending in ", str( date(2022,month[],1),"Mmmm" ), ": ", fq( date[], month[] ) );
Date is 2022-05-01
Year ending in January: 2
Year ending in February: 1
Year ending in March: 1
Year ending in April: 1
Year ending in May: 4
Year ending in June: 4
Year ending in July: 4
Year ending in August: 3
Year ending in September: 3
Year ending in October: 3
Year ending in November: 2
Year ending in December: 2