DateCalc Op

DateCalc

Perform date calculations


This Op lets you perform date calculations. Adding and subtracting seconds, minutes, hours, days, months or years to the input date. No dependencies. Sample patch: https://cables.gl/edit/mzfGGl


Full Name
  • Ops.Date.DateCalc
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


Example Patch DigiClock

Sample patch for DateFormatter and DateCalc

Open In Editor

INPUT PORTS


timestamp (Number)

Unix timestamp. eg. from the DateAndTime op. If empty, current timestamp is used

difference (Number: integer)

Number of days / months / .... to add

type index (Number: integer)
update (Trigger)

Update time value (not needed if an timestamp input is used)

OUTPUT PORTS


Date (Object)

The calculated date in JS Date format

Timestamp (Number)

The calculated date in timestamp (milliseconds) format


Patches using DateCalc

  • Examples
  • Public
  • My Patches

Known Issues

There is a dependency on moment.js, but it's not used. I can't find where to remove the dependency

Changelog


created opuser avatarGeertVanDamme - 2020-10-27 10:38
added lib: moment.jsuser avatarGeertVanDamme - 2020-10-27 15:17
cloned op from Ops.User.GeertVanDamme.DateCalcuser avatarGeertVanDamme - 2020-11-17 21:39