template
code:today.js
(function() {
const today = new Date()
const year = today.getFullYear()
const month = ("0"+(today.getMonth() + 1)).slice(-2)
const date = ("0"+today.getDate()).slice(-2)
const yesterdayDate = ("0"+(today.getDate()-1)).slice(-2)
const tomorrowDate = ("0"+(today.getDate()+1)).slice(-2)
return `🖋${year}-${month}-${date} ${weekdaystoday.getDay().substr(0, 3)} やったこと
今日の学び
感想
リンク
})()
code:tommorow.js
(function() {
const today = new Date()
today.setDate( today.getDate() + 1 )
const year = today.getFullYear()
const month = ("0"+(today.getMonth() + 1)).slice(-2)
const date = ("0"+today.getDate()).slice(-2)
const yesterdayDate = ("0"+(today.getDate()-1)).slice(-2)
const tomorrowDate = ("0"+(today.getDate()+1)).slice(-2)
console.log(today.getDay())
return `🖋${year}-${month}-${date} ${weekdaystoday.getDay().substr(0, 3)} やったこと
今日の学び
感想
リンク
})()