Date
Date or date with time
Dates in the API world can come in different formats:
One of the ISO-8601 date formats such as 2021-20-01T16:30:20.123Z
Timestamp, such as 1637988627
A simple text, such as 2021-01-13 16:30
No matter what format your API works with, Make users should be able to work with a user-friendly format on input and output.
Make stores the inserted dates as a timestamp with milliseconds in a text format and passes them to requests as ISO with milliseconds and universal timezone YYYY-MM-DDThh:mm:ss.sssZ
.
Specification
time
Type:
Boolean
Default:
true
If
false
, the GUI will only display date selection.
nested
Available types:
TypeSpecificationarray
Provides an array of nested parameters which are shown when the value of the parameter is set (value is not empty)
string
Provides URL address of an RPC to load list of nested parameters.
object
Provides a detailed specification of nested parameters.
Usage of nested fields:
Input Parameters
Mappable parameters, which require a date in any format, should allow users to enter a date in a user-friendly manner and their own timezone (e.g. 1. 12. 2021 16:30) and also use our keyword now, timestamp, or any in-built date functions.
This means that any date formatting/parsing should happen inside the module in the Communication tab, either directly or via IML function.
Example
Date and time input
The following example requires three types of dates: birthday as YYYY-MM-DD
, createdAt as timestamp, and dueDate as YYYY-MM-DDThh:mm:ss.sssZ
(GMT timezone).
By default, the field accepts date and time.
Output Parameters
The dates returned by the API should be shown to the users in a user-friendly way, using their timezone and localization settings.
Dates with Time
Dates with time have to be formatted/parsed to our ISO 8601 format, so it is shown in the output of the module correctly. Make is using ISO 8601 format: YYYY-MM-DDTHH:mm:ss.sssZ
.
Any other format, even just without milliseconds won't be shown correctly in the output and needs to be parsed in the Communication tab – either directly or using an IML function.
Dates Without the Time
Dates without the time can have the same format as the API response because in some cases (such as a birthday), adding the time (0:00) and the timezone can be counterproductive.
Examples
Direct Formatting
In the following example, the API returns two types of dates: createdAt as timestamp, and dueDate as 2020-02-03T17:43:09+0000.
IML Function
Last updated