â–¸ dateTimeFormat(timestamp, options): string
description format date time.
remark supported jssdk >= 4.36.0
example
Code
Parameters
| Name | Type |
|---|---|
timestamp | number |
options | DateTimeFormatOptions |
Returns
string
string
Interface: DateTimeFormatOptions
| Name | Type | Description |
|---|---|---|
| weekday? | "long" | "short" | "narrow" | |
| year? | "numeric" | "2-digit" | |
| month? | "long" | "short" | "narrow" | "numeric" | "2-digit" | |
| day? | "numeric" | "2-digit" | |
| hour? | "numeric" | "2-digit" | |
| minute? | "numeric" | "2-digit" | |
| second? | "numeric" | "2-digit" | |
| dateStyle? | "medium" | "long" | "short" | "full" | |
| timeStyle? | "medium" | "long" | "short" | "full" |
Was this page helpful?
Last modified on