From dc0e4b4936839855220d3c8914b74d9429cc3e0e Mon Sep 17 00:00:00 2001 From: ZeroCal Su <3146312184@qq.com> Date: Tue, 5 Nov 2024 09:10:00 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=97=A5?= =?UTF-8?q?=E5=8E=86=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/Calendar.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/Calendar.js b/apps/Calendar.js index 3f8804d..d15ea34 100644 --- a/apps/Calendar.js +++ b/apps/Calendar.js @@ -49,8 +49,8 @@ export class Calendar extends plugin { const startDate = startDateStr || null; const endDate = endDateStr || null; - const startTime = startDate ? `${startDate.toISOString().slice(5, 10).replace('-', '.')} ${startDate.toTimeString().slice(0, 5)}` : ''; - const endTime = endDate ? `${endDate.toISOString().slice(5, 10).replace('-', '.')} ${endDate.toTimeString().slice(0, 5)}` : ''; + const startTime = startDate ? `${startDate.toLocaleDateString('zh-CN').slice(5).replace('/', '.')} ${startDate.toTimeString().slice(0, 5)}` : ''; + const endTime = endDate ? `${endDate.toLocaleDateString('zh-CN').slice(5).replace('/', '.')} ${endDate.toTimeString().slice(0, 5)}` : ''; const activeStatus = item.countDown ? (startDate && currentDate >= endDate ? '已结束' : @@ -83,7 +83,7 @@ export class Calendar extends plugin { title: '深境再临', time: (() => { const cs = s + Math.floor((currentDate - s) / d) * d; - return `${new Date(cs).toLocaleDateString().slice(5).replace('/', '.')} ${new Date(cs).toTimeString().slice(0, 5)} - ${new Date(cs + d).toLocaleDateString().slice(5).replace('/', '.')} ${new Date(cs + d).toTimeString().slice(0, 5)}`; + return `${new Date(cs).toLocaleDateString('zh-CN').slice(5).replace('/', '.')} ${new Date(cs).toTimeString().slice(0, 5)} - ${new Date(cs + d).toLocaleDateString('zh-CN').slice(5).replace('/', '.')} ${new Date(cs + d).toTimeString().slice(0, 5)}`; })(), active: '进行中', remain: this.format(Math.round((s + Math.floor((currentDate - s) / d) * d + d - currentDate) / 1000)), diff --git a/package.json b/package.json index d751cee..1646074 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "waves-plugin", - "version": "1.5.8", + "version": "1.5.9", "description": "基于 Yunzai 的鸣潮游戏数据查询插件", "main": "index.js", "scripts": {