Formulae - newageoflight/fast-discharge GitHub Wiki
Formulae are based on Nunjucks expressions. That is, whatever can go between the double-parentheses in Nunjucks, will evaluate in FastDischarge.
The following helper functions are currently provided for users:
dateDifference(a, b, unit?)
: returns the difference between two datesa
andb
, givenb
is later thana
. Unit can be "days", "months", "years", etc. Seeday.js
documentation for more information.formatDate(d, format?)
: format a date using the specified format string e.g. "DD-MM-YYYY"