template
code:weeksheet.js
(function() {
// ここで返してるものがページのタイトルと本文になるよ
const now = new Date();
now.setDate(now.getDate() - Math.abs((now.getDay() + 6)%7));
now.toLocaleDateString();
const title = ${now.toLocaleDateString()}の週
const dayStr = [${now.toLocaleDateString()}](${weeksStr[now.getDay()]})
now.setDate(now.getDate()+1);
return dayStr;
});
return `${title}
やったこと
${weekDays.join("\n")}
`;
})()
code:daysheet.js
(function() {
const now = new Date()
// ここで返してるものがページのタイトルと本文になるよ
const monthStr = ${now.getMonth()+1}.padStart(2, 0);
const dateStr = ${now.getDate()}.padStart(2, 0);
const weeksNth = Math.floor((now.getDate() - now.getDate() + 12) / 7);
return `${now.getFullYear()}/${monthStr}/${dateStr}(${weekStr})
//#${now.getFullYear()}/${monthStr}/W${weeksNth}
やったこと
`;
})()