Drafts Reference

Working with Dates

The Javascript implementation in Drafts supports all standard Javascript date object methods and properties. The w3schools page is a great reference for these standard methods.

The scripting environment also includes Date.js, an excellent set of extensions to Javascript dates that allow simple ways to parse natural language into date objects and adds convenience methods for common date operations. Any of the examples in the Date.js documentation will work in Drafts scripting.