Last Sync: 2026-01-01 23:10 (Mobile)

This commit is contained in:
2026-01-01 23:10:48 +09:00
parent 401f536b3b
commit efefcb9046
2719 changed files with 0 additions and 254620 deletions

View File

@@ -1,41 +0,0 @@
<%*
function getPreviousWeek(year, week) {
if (week === 1) {
year -= 1;
let lastWeekOfYear = getISOWeekNumber(new Date(year, 11, 28));
return `${year}-W${String(lastWeekOfYear).padStart(2, '0')}`;
} else {
week -= 1;
return `${year}-W${String(week).padStart(2, '0')}`;
}
}
function getISOWeekNumber(date) {
let day = new Date(date.getFullYear(), date.getMonth(), date.getDate());
let dayNum = day.getDay() || 7;
day.setDate(day.getDate() + 4 - dayNum);
let yearStart = new Date(day.getFullYear(), 0, 1);
return Math.ceil((((day - yearStart) / 86400000) + 1) / 7);
}
let [year, week] = tp.file.title.split("-W").map(Number);
let lastWeek = getPreviousWeek(year, week);
let lastWeekPath = "10. Planner/12. Weekly/" + lastWeek;
let section = "## 다음 주 계획";
let should_include = false;
let sectionContent = "";
let lwfile = tp.file.find_tfile(lastWeekPath);
if(lwfile) {
const content = await app.vault.read(lwfile);
if(content.includes(section)) {
let startIndex = content.indexOf(section) + section.length;
let endIndex = content.indexOf('\n##', startIndex);
endIndex = endIndex === -1 ? content.length : endIndex;
sectionContent = content.substring(startIndex, endIndex).trim();
should_include = sectionContent.length > 0;
}
}
tR += should_include ? sectionContent : "없습니다😀";
%>