1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
| <%* let today = tp.date.now("YYYY-M-D") let inputDate = await tp.system.prompt("输入示例:"+today,today)
titleName = window.moment(inputDate, "YYYY-M-D", true).format("YYYY-M-D")
today = window.moment(inputDate, "YYYY-M-D", true).format("YYYY-M-D") yestoday = window.moment(inputDate, "YYYY-M-D", true).add(-1,"days").format("YYYY-M-D") tomorrow = window.moment(inputDate, "YYYY-M-D", true).add(1,"days").format("YYYY-M-D") currentDay = window.moment(inputDate, "YYYY-M-D", true).format("e")
let createTime = tp.file.creation_date("dddd Do MMMM YYYY HH:mm:ss") let modificationDate = tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss")
let this_week = moment().subtract(0, "week").format("gggg-ww") last_week = window.moment(this_week, "YYYY-WW", true).add(-7,"days").format("YYYY-WW") next_week = window.moment(this_week, "YYYY-WW", true).add(7,"days").format("YYYY-WW")
moday_next_week = window.moment(next_week, "YYYY-WW", true).format("YYYY-M-D") friday_last_week = window.moment(last_week, "YYYY-WW", true).add(4,"days").format("YYYY-M-D")
-%> --- title: "<% today %>" tags: - dayly date created: <% createTime %> date modified: <% modificationDate %> --- <% tp.web.daily_quote() %> <% tp.web.random_picture("200x200", "landscape,water") %> <% tp.user.weather_bj() %>
<%* // 周一 周五 链接到上周 or 下周 if (currentDay == 0) { yestoday = friday_last_week } else if (currentDay == 4) { tomorrow = moday_next_week } else { } before_date = window.moment(yestoday, "YYYY-M-D", true).format("YYYY-MM-DD_ddd") after_date = window.moment(tomorrow, "YYYY-M-D", true).format("YYYY-MM-DD_ddd") -%> << Invalid link | Invalid link >>
## <% today %>
### 每日任务
#plan - [ ] todo
^<% today %>-plan
### tracking
TimeLine - now <%* if (currentDay == 0) { %> ### 例会 <%* } %> ### 昨日回顾
!Invalid link
<%* tp.file.cursor() -%>
|