# uni-dateformat ## Instructions 组件名:uni-dateformat 代码块: uDateformat 点击下载&安装 ### Syntax - 使用 ``(或 ``,当需要包裹子节点时)。 - 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。 #### Properties | 属性名 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | date | Object|String|Number | Date.now() | 要格式化的日期对象/日期字符串/时间戳 | | threshold | Array | [0, 0] | 转化类型阈值 | | format | String | 'yyyy/MM/dd hh:mm:ss' | 格式字符串 | | locale | String | zh | 格式化使用的语言,目前支持zh(中文)、en(英文) | #### Events See official docs for full events list: `https://uniapp.dcloud.net.cn/component/uniui/uni-dateformat.html` #### Platform Compatibility See official docs for platform support table: `https://uniapp.dcloud.net.cn/component/uniui/uni-dateformat.html` ### Examples ### Example (Example 1) ```vue ``` ### Example (Example 2) ```html ``` ### Example (Example 3) ```vue ``` ### Example (Example 4) ```vue ``` ### Example (Example 5) ```vue ``` ### Example (Example 6) ```vue ``` Reference: - [Official Documentation](https://uniapp.dcloud.net.cn/component/uniui/uni-dateformat.html) - [Plugin Marketplace](https://ext.dcloud.net.cn/plugin?name=dateformat) - [Local Example](examples/uni-ui/uni-dateformat.vue)