fy5253Quarter#
- swordfish.function.fy5253Quarter()#
Using the 52-53 week in fiscal year (4-4-5 calendar), this function returns the start date of fiscal year which includes X.
If nearest=true, the last weekday which is closest to the last day of startingMonth will be used as the starting date of the fiscal year.
If nearest=false, the last weekday in startingMonth will be used as the starting date of the fiscal year.
If the offset is specified, indicating that starting from the offset, the result will be updated every n years. Note that only when n is greater than 1, the offset can take effect.
- Parameters:
X (Constant) – A scalar/vector, its type can be DATE, DATETIME, TIMESTAMP, NANOTIMESTAMP.
weekday (Constant, optional) – An integer between 0 and 6. 0 means Monday, 1 means Tuesday, …, and 6 means Sunday. The default value is 0.
startingMonth (Constant, optional) – An integer between 1 and 12 indicating the beginning month of the year. The default value is 1.
qtrWithExtraWeek (Constant, optional) – An integer between 1 to 4. If there is a leap quarter (usually the quarter contains 13 weeks, but the leap quarter contains 14 weeks ), it indicates the leap quarter.
nearest (Constant, optional) – A Boolean value with the default value of true.
offset (Constant, optional) – A scalar with the same data type as X. It must be smaller than the minimum value in X. The default value is the minimum value in X.
n (Constant, optional) – A positive integer. The default value is 1.