From bb800db2b923011f679819754e7b69f940ede1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Tue, 8 Aug 2023 18:15:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20`util.toDateString()`=20?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E5=92=8C=E6=96=87=E6=A1=A3=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/util/index.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/util/index.md b/docs/util/index.md index cd386a29..f683e9cf 100644 --- a/docs/util/index.md +++ b/docs/util/index.md @@ -116,17 +116,18 @@ var result2 = util.toDateString(new Date('2023-01-01 11:35:25'), 'ss[s]'); // 25 // 自定义 meridiem var result3 = util.toDateString( '2023-01-01 11:35:25', - 'hh:mm:ss A' + 'hh:mm:ss A', { customMeridiem: function(hours, minutes){ return (hours < 12 ? 'AM' : 'PM') //.split('').join('.') // 有句点,A.M. //.toLowerCase() // 小写,a.m. } + } ); // 11:35:25 AM ``` -所有可用的格式列表 +参数 `format` 所有可用的格式列表 : | 格式 | 示例 | 描述 | | --- | --- | --- |