Skip to content

Commit 4c6a2aa

Browse files
authored
Merge pull request #253 from takker99:start
feat: Enable to specify `start` in auto-dialy/review generators
2 parents 42ee45f + 424f29c commit 4c6a2aa

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

workflow/auto-diary.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ declare const scrapbox: Scrapbox;
2020
const project = "takker-memex";
2121

2222
/** 現在日までの日刊記録sheetを生成する */
23-
export const main = async (): Promise<() => void | Promise<void>> => {
23+
export const main = async (
24+
start = new Date(2023, 0, 24),
25+
): Promise<() => void | Promise<void>> => {
2426
if (scrapbox.Project.name !== project) return () => {};
2527

2628
// scrapbox.Project.pagesが生成されるまで待つ
@@ -37,7 +39,6 @@ export const main = async (): Promise<() => void | Promise<void>> => {
3739
}, 2000);
3840
});
3941

40-
let start = new Date(2023, 0, 24);
4142
const callback = async () => {
4243
const now = new Date();
4344
const interval = { start, end: now };

workflow/auto-review.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export const main = async (
2929
project: string,
3030
dailyTemplate: [string, string, string],
3131
weeklyTemplate: [string, string, string],
32+
start = new Date(2023, 1, 3),
3233
): Promise<() => void | Promise<void>> => {
3334
if (scrapbox.Project.name !== project) return () => {};
3435

@@ -46,7 +47,6 @@ export const main = async (
4647
}, 2000);
4748
});
4849

49-
let start = new Date(2023, 1, 3);
5050
const callback = async () => {
5151
const now = new Date();
5252
const interval = { start, end: addDays(now, 1) };

0 commit comments

Comments
 (0)