main
1// 部分取自 modern-nju-thesis
2
3// 显示中文日期
4#let datetime-display(date) = {
5 date.display("[year] 年 [month] 月 [day] 日")
6}
7
8// 显示全中文日期
9#let datetime-display-full(date) = {
10 let cap-nums = "〇一二三四五六七八九".codepoints()
11 str(date.year())
12 .codepoints()
13 .map(n => cap-nums.at(n.to-unicode() - 48))
14 .join()
15 "年"
16 numbering("一", date.month())
17 "月"
18 numbering("一", date.day())
19 "日"
20}
21
22// 显示英文日期
23#let datetime-en-display(date) = {
24 date.display("[month repr:short] [day], [year]")
25}