From 3f1becd37412e0c28367d2e43384c849f43b89d1 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 28 Jul 2026 13:44:48 +0800 Subject: [PATCH] =?UTF-8?q?v2.1.20=20=E2=80=94=20=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=97=A5=E7=A8=8B=E8=87=AA=E5=8A=A8=E5=A1=AB=E5=85=85=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=97=A5=E6=9C=9F=E3=80=907=E6=9C=8828=E6=97=A5=2009:?= =?UTF-8?q?00=E3=80=91=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index ec195b2..078a9ee 100644 --- a/app.py +++ b/app.py @@ -427,7 +427,20 @@ def api_calendar_sync_all(): summary = (evt.get('summary') or '').strip() if not summary: continue - text = f"【{evt['time']}】{summary}" if evt.get('time') else summary + date_str = evt.get('date', '') + if date_str: + try: + parts = date_str.split('-') + date_label = f"{int(parts[1])}月{int(parts[2])}日" + except: + date_label = date_str + else: + date_label = '' + time_str = evt.get('time', '') + prefix = f"【{date_label} {time_str}】" if date_label and time_str else \ + (f"【{date_label}】" if date_label else \ + (f"【{time_str}】" if time_str else '')) + text = f"{prefix}{summary}" if prefix else summary loc = evt.get('location', '') if loc: text += f" @{loc}"