temporalAdd#
- swordfish.function.temporalAdd()#
Add a value to a temporal variable.
- Parameters:
obj (Constant) – A temporal scalar/pair/vector.
duration (Constant) – An integer.
unit (Constant, optional) –
A STRING vector, by default DFLT.
When parameter duration is an integer, unit is:
the unit of parameter duration. It can be “ns”(nanosecond), “us”(microsecond), “ms”( millisecond), “s”(second), “m”(minute), “H”(hour), “d”(day), “w”(week), “M”(month), “y”( year), or “B”(business day).
the identifier of trading calendar, e.g., the Market Identifier Code of an exchange, or a user-defined calendar name. The corresponding file must be saved in marketHolidayDir.
When duration is of DURATION type, this parameter is not required.
Note
When unit is “y” or “M”, the result is consistent with mysql. Pandas provides an offset object Dateoffsets to move dates forward a given number of valid dates. When the DateOffset parameter is specified as months or years, the result is also consistent with temporalAdd.