From f921f0e8480f98cb8a62b16366f4060081487dbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88?= <3036905349@qq.com> Date: Mon, 22 May 2023 03:06:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=8C=B9=E9=85=8D24?= =?UTF-8?q?=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/other.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/other.ts b/src/other.ts index 8122676..cac7810 100644 --- a/src/other.ts +++ b/src/other.ts @@ -132,7 +132,7 @@ export const escapeRegExpObject = (obj: {}) => { export const checkAndCompleteDate = (dateString: string) => { const date = dayjs(dateString, ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss']); if (date.isValid()) { - if (/([01]\d|2[0-4]):([0-5]\d|60):([0-5]\d|60)/.test(dateString)) { + if (/([01]\d|2[0-3]):([0-5]\d|60):([0-5]\d|60)/.test(dateString)) { // 如果日期格式正确,则直接返回该日期 return dayjs(dateString).format('YYYY-MM-DD HH:mm:ss'); } else { From d78fb98f047ee7d393f21bef8996cce447464b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A9=BA=E6=8C=87=E9=92=88?= <3036905349@qq.com> Date: Mon, 22 May 2023 03:09:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=8C=B9=E9=85=8D60?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/other.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/other.ts b/src/other.ts index cac7810..c8f4319 100644 --- a/src/other.ts +++ b/src/other.ts @@ -132,7 +132,7 @@ export const escapeRegExpObject = (obj: {}) => { export const checkAndCompleteDate = (dateString: string) => { const date = dayjs(dateString, ['YYYY-MM-DD', 'YYYY-MM-DD HH:mm:ss']); if (date.isValid()) { - if (/([01]\d|2[0-3]):([0-5]\d|60):([0-5]\d|60)/.test(dateString)) { + if (/([01]\d|2[0-3]):([0-5]\d):([0-5]\d)/.test(dateString)) { // 如果日期格式正确,则直接返回该日期 return dayjs(dateString).format('YYYY-MM-DD HH:mm:ss'); } else {