takker-scheduler-3/diary-page
takker-scheduler-3で使用する日付ページを作成するmodule
日付ページの書式は日刊記録sheetと同じ
日付ページから日付を取得する
code:script.js
import {lightFormat, parse, isValid} from '../date-fns.min.js/script.js';
export function getDate(title = undefined) {
title = title ?? scrapbox.Page.title;
const date = parse(title, "'日刊記録sheet' yyyy-MM-dd", new Date());
return isValid(date) ? date : undefined;
}
日付から日付ページのタイトルを作る
code:script.js
export const getTitle = (date) => lightFormat(date, "'日刊記録sheet' yyyy-MM-dd");
#2021-03-15 04:30:57