package
0.0.0-20230502073429-587acefb9ced
Repository: https://github.com/ayh20/flogo-components.git
Documentation: pkg.go.dev

# README

Date Math Utility

This activity gives you the ability to input a datetime string and add or subtract a number of days,Hours,Minutes or seconds to that date

Installation

Navigate to the Flogo app directory [Essential !] and issue the following command

flogo install github.com/ayh20/flogo-components/activity/datemath

Schema

Inputs and Outputs:

{
"inputs":[
      {
        "name": "date",
        "required": true,
        "type": "string"
      },
      {
        "name": "amount",
        "required": true,
        "type": "string"
      },
      {
        "name": "unit",
        "required": true,
        "type": "string",
        "allowed" : ["Day", "Hour", "Min", "Sec"]
      },
      {
        "name": "function",
        "required": true,
        "type": "string",
        "allowed" : ["Add", "Subtract"]
      }
    ],
    "outputs": [
      {
        "name": "result",
        "type": "string"
      }
    ]
  }

Settings

SettingDescription
datethe date we are going perform the operation on
amountthe amount of hours/mins etc to add or subtract
unitthe unit of operation ("Day", "Hour", "Min", "Sec")
functionthe type of operation ("Add", "Subtract")

Outputs

OutputDescription
resultthe result as a date

Configuration Examples

Simple

Add and subtract from a date: