优化空行输出

master
yutent 2023-07-06 10:33:51 +08:00
parent 3a33b78b15
commit bc55309c1a
4 changed files with 8 additions and 2 deletions

4
index.js Executable file

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "bash-calendar",
"description": "终端版万年历",
"version": "1.2.5",
"version": "1.2.6",
"author": "yutent <yutent.io@gmail.com>",
"bin": {
"calendar": "index.js",

View File

@ -231,7 +231,6 @@ function drawTbody(year, month) {
console.log(tr)
}
}
console.log('') // 再打印一个空行, 用于分隔多个日历
}
// 渲染日历

View File

@ -19,6 +19,9 @@ var [year, month] = getThisYearMonth()
function drawOneYear(y) {
for (let i = 0; i < 12; i++) {
drawCalendar(y, i)
if (i < 11) {
console.log('') // 再打印一个空行, 用于分隔多个日历
}
}
}