beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
DateCalc
Ops.Date.DateCalc
Namespace: Ops.Date
Perform date calculations

summary (oneliner)

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

Known Issues

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

doc

issues

youtube id

collections

related ops

Inputs

timestamp (Number)

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


difference (integer /Number)

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


type index (integer /Number)

type (string /Number)

The date part that needs to change ["years", "months", "days", "hours", "minutes", "seconds"]


update (Trigger)

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


Outputs

Date (Object)

The calculated date in JS Date format


Timestamp (Number)

The calculated date in timestamp (milliseconds) format


Caught a mistake or want to contribute to the documentation?

Edit Documentationcancel save
DigiClock:

Sample patch for DateFormatter and DateCalc



Credits


Changelog


created op
2020-10-27 - GeertVanDamme

added lib: moment.js
2020-10-27 - GeertVanDamme

cloned op from Ops.User.GeertVanDamme.DateCalc
2020-11-17 - GeertVanDamme

Examples using DateCalc

Public Patches using DateCalc