// なぜか動かない
<% tp.file.cursor() %>
<%*
// 平日かどうか判別したい
// asyncなんもわからん
async function isWeekDay() {
let day_of_week = moment(tp.file.title, "YYYY年MM月DD日").weekday(); // 0 or 6
return day_of_week == 0 ? false
: day_of_week == 6 ? false
: true;
}
async function asyncSleep(ms) {
return new Promise((resolve) => { setTimeout(() => { resolve(); }, ms); });
}
await asyncSleep(50) // waitを入れてみる
if (await isWeekDay()) {
- [ ] 会社でのみ行うタスクA
- [ ] 会社でのみ行うタスクB
}
%>
Created
August 23, 2023 11:37
-
-
Save mimikun/e3979e2fc487b6d9ac053ad7e3f2a646 to your computer and use it in GitHub Desktop.
デイリーノート
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment