utils.utils.date_to_format
Declaration
lua
utils.date_to_format(timestamp, format) or utils.date_to_format(format)
Description
Format timestamp or current time.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
timestamp | number | Optional | now | UNIX timestamp |
format | string | Required | — | Date format pattern |
Return Values
| Type | Description |
|---|---|
| string | Formatted date |
Example
lua
local s = utils.date_to_format("yyyy-MM-dd")