Date-functions are statically bound to "date" -namespace. If output-type is other than Object then it is explicitly written out.
- now() <Object>
- add(amount <Number>, field <String>, date <Object>) <Object>
- toMillis() <Number>
- fromMillis() <Object>
- fromString($pattern) <Object>
Now returns the current date and time as an Object. The resulting Object has the following Number-fields, except TimeZone, which is an Object.
add(amount <Number>, field <String>, date <Object>) <Object>
Add adds the given number amount for the given field into the given date-object.
- named arguments are not supported for date:add field and date are optional arguments.
- If no field is given, then the Day -field will be used to add the with the given amount.
ToString converts date-Object into String-format, decided by the $pattern. To see the supported options in the pattern, please refer to "https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html".
ToMillis converts the date-Object into milliseconds passed since January 1, 1970, 00:00:00 GMT, offset by the input-date Object.
FromMillis converts the milliseconds (Number-type) into Operon date-Object.