formatDatelink
Formats a date according to locale rules.
基于区域规则格式化日期。
参数
| value | Type: |
| format | Type: |
| locale | Type: |
| timezone | Type: 可选. 默认值是 |
返回值
string
说明
Where:
这里的:
valueis a Date, a number (milliseconds since UTC epoch) or an ISO string (https://www.w3.org/TR/NOTE-datetime).value是一个日期、数字(从 UTC 时代以来的毫秒数)或 ISO 字符串 (https://www.w3.org/TR/NOTE-datetime)。formatindicates which date/time components to include. SeeDatePipefor more details.format表示要包含的日期/时间部件。欲知详情,参见DatePipe。localeis astringdefining the locale to use.locale是一个string,用来定义要使用的区域。timezoneto be used for formatting. It understands UTC/GMT and the continental US time zone abbreviations, but for general use, use a time zone offset (e.g.'+0430'). If not specified, host system settings are used.timezone用在格式化中。它能理解 UTC/GMT 和美国大陆时区缩写,但对于一般用途则使用时区偏移(比如'+0430')。 如果没有指定,则使用宿主系统中的设定。
See DatePipefor more details.
欲知详情,参见 DatePipe。