Using Moment.JS
This example shows how you can use the library moment.js to simplify date calculations.
Technotes
Download the app. From your My Apps page click New Application and then From Existing select the app you downloaded. This app requires the setting secureJS=false in VoltConfiguration.nsf.
Screenshot