JAVASCRIPT
Date utility functions
All samples are using Ink.requireModules
, please read how to use it at Ink.requireModules section
Function name | Description |
---|---|
.get(format, [_date]) | Formats a date object. |
.set([format], str_date) | Creates a date object based on a format string. |
Formats a date object.
This works exactly as php date() function. https://php.net/manual/en/function.date.php
format
The format in which the date it will be formatted._date
The date to format. Can receive unix timestamp or a date object. Defaults to current time.Code
Creates a date object based on a format string.
This works exactly as php date() function. https://php.net/manual/en/function.date.php
format
The format in which the date will be formatted. Defaults to 'Y-m-d'str_date
The date formatted.Code