semiMonthEnd#
- swordfish.function.semiMonthEnd()#
Suppose X is the d-th day of the month:
If d < dayOfMonth: return the last day of the previous month.
If d >= dayOfMonth: return the dayOfMonth-th day of the current month.
If parameter offset is specified, the result is updated every n semi-months. 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.
dayOfMonth (Constant, optional) – An integer between 2 and 27. The default value is 15, by default DFLT.
offset (Constant, optional) – A scalar of the same data type as X. It must be no greater than the minimum value of X, by default DFLT.
n (Constant, optional) – A positive integer, by default DFLT.