Skip to content

Commit 6c4ce12

Browse files
committed
スケジュール名を変更
1 parent ef4900f commit 6c4ce12

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/sync-calendar/src/main.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ function main() {
2929
const firstDayOfNextMonth = new Date(
3030
now.getFullYear(),
3131
now.getMonth() + 1,
32-
1
32+
1,
3333
);
3434
const firstDayOfFollowingMonth = new Date(
3535
now.getFullYear(),
3636
now.getMonth() + 2,
37-
1
37+
1,
3838
);
3939

4040
// カレンダーオブジェクトを取得
@@ -48,23 +48,23 @@ function main() {
4848
// 今月と来月のプライベート予定を削除
4949
const existingEvents = workCal.getEvents(
5050
firstDayOfMonth,
51-
firstDayOfFollowingMonth
51+
firstDayOfFollowingMonth,
5252
);
5353
for (const event of existingEvents) {
54-
if (event.getTitle().startsWith("プライベート予定")) {
54+
if (event.getTitle().startsWith("不在")) {
5555
event.deleteEvent();
5656
}
5757
}
5858

5959
// 個人カレンダーの予定を取得
6060
const personalEvents = personalCal.getEvents(
6161
firstDayOfMonth,
62-
firstDayOfFollowingMonth
62+
firstDayOfFollowingMonth,
6363
);
6464

6565
// 個人カレンダーの予定を社用カレンダーにコピー
6666
for (const event of personalEvents) {
67-
const title = `プライベート予定`; // ユニークなタイトルを生成
67+
const title = "不在"; // ユニークなタイトルを生成
6868

6969
// 社用カレンダーに予定を作成
7070
const newEvent = workCal.createEvent(
@@ -73,7 +73,7 @@ function main() {
7373
event.getEndTime(),
7474
{
7575
description: "この予定は個人用カレンダーから同期されています。",
76-
}
76+
},
7777
);
7878

7979
// イベントをプライベートに設定

0 commit comments

Comments
 (0)