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 dates a and b, given b is later than a. Unit can be "days", "months", "years", etc. See day.js documentation for more information.
  • formatDate(d, format?): format a date using the specified format string e.g. "DD-MM-YYYY"