quarterEnd#

swordfish.function.quarterEnd()#

Return the first day of the quarter that X belongs to. The first months of the quarters are determined by startingMonth. Note that startingMonth=1 is equivalent to startingMonth=4, 7 or 10.

If parameter offset is specified, the result is updated every n quarters. The parameters offset and n must be specified together, and offset takes effect only when n > 1.

Parameters:
  • X (Constant) – A scalar/vector of data type DATE, DATEHOUR, DATETIME, TIMESTAMP or NANOTIMESTAMP.

  • endingMonth (Constant, optional) – An integer between 1 and 12 indicating a month. The default value is 1.

  • offset (Constant, optional) – A scalar of the same data type as X. It must be no greater than the minimum value of X. The default value is the minimum value of X.

  • n (Constant, optional) – A positive integer. The default value is 1.