Scripting
Jump to navigation
Jump to search
« Page as of 2016-11-04, editions Mobile 4.0.0, Desktop 1.0.6 »
This page is a stub, with some tidbits. A more complete page is forthcoming.
Native Memento Calculation scripting
Scripting for the Calculation field type is limited and is described well in Calculation field.
Scripting in Memento going forward will likely to be focused in JavaScript, as in JavaScript field and Triggers, so getting used to JavaScript is recommended.
However, one feature of native Memento scripting that does not exist (as yet) in JavaScript is the ability to refer to fields of related libraries, so if for nothing else, it is still needed for that.
Scripting Memento in JavaScript
The JavaScript field type
JavaScript scripting for Memento Triggers
moment.min.js — a useful wrapper for JavaScript dates & times
See http://momentjs.com and its subordinate pages Guides and Docs.
- Tidbit
- To get the current date, use moment().toDate(). To get the current date & time, use moment().toDate().getTime().