Advanced Date and Time Handling

If the date and time system variables do not meet your needs, you can use our simple REST API wrapper for the popular momentjs library.


Use this API as part of a workflow

Create an API call, extract the result and add it to a workflow with your API to take advantage of this functionality.

API syntax

The API provides a simple JSON interface, using GET requests. The momentjs library lets you chain operations together. The key documentation for the functions are available from and


Understand the URL format

The underlying node library is exposed by separating each call by a / in the path of the URL. Variables passed to the functions are separated by a ~.

Simple example

The simplest call is, which returns {"result":"2018-07-16T18:53:09.563Z"}, i.e. the current time.

Getting the date for next week

A more practical example would be calling the equivalent of
moment.utc().add(7, ‘days’).format()

This is achieved by calling:
which returns: {"result":"2018-07-23T19:08:52Z"}.

will output the same in a human friendly date format:
{"result":"Mon, Jul 23, 2018 7:09 PM"}.


The timezone module is also installed, so you create more complex calls:

which is the same as calling in Javascript:

      .format(“LLLL z”)

That example parses a UTC date, converts it to the US West Coast timezone and then changes the locale to French so the format outputs the date in French long-friendly format (LLLL) followed by the timezone (Z), still in PDT.

The output is:
{"result":"mercredi 20 août 1980 08:25 PDT"}



We have to URL-encode the / in America/Los_Angeles to %2F as that is part of the URL syntax. The space character in the format string is also converted to %20.