const currentPage = dv.current().file; const dailyPages = dv.pages('"0-Daily"').sort(k=>k.file.name, "asc"); const currentPageName = currentPage.name; const index = dailyPages.findIndex((e) => {return e.file.name === currentPageName}); if (index < 1) { dv.table(["File", "Created", "Size"],[]); } else { const lastIndex = index - 1; const lastPage = dailyPages[lastIndex].file; const allPages = dv.pages().values; const searchPages = []; const lastTime = dv.parse(lastPage.name); const currentTime = dv.parse(currentPage.name); for (let page of allPages) { const pageFile = page.file; if (pageFile.cday > lastTime && pageFile.cday <= currentTime) { searchPages.push(pageFile); } } dv.table(["File", "Created", "Size"], searchPages.sort((a, b) => a.ctime > b.ctime ? 1 : -1).map(b => [b.link, b.ctime, b.size])); } 算子 算子,或者叫做运算符,在编程中就像数学中的加减乘除一样,它用来对数据进行各种操作。比如在 JavaScript 中,”+” 是一个算子,它可以把两个数字相加,或者把两个字符串连接在一起。 英语中通常为 Operator