From abcf48a22905842cd86bc8097b4f6f6a2615389a Mon Sep 17 00:00:00 2001 From: a946547732 Date: Wed, 29 May 2024 16:02:00 +0800 Subject: [PATCH] Wed May 29 16:02:00 CST 2024 inscode --- html/index.html | 12 ++++++++++++ index.html | 12 ++++++++++++ index.js | 8 ++++++-- package.json | 12 ++++++------ 4 files changed, 36 insertions(+), 8 deletions(-) create mode 100644 html/index.html create mode 100644 index.html diff --git a/html/index.html b/html/index.html new file mode 100644 index 0000000..10e6b64 --- /dev/null +++ b/html/index.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + 你好2224444 + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..8b77371 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + + 网页 + + + 你好111 + + \ No newline at end of file diff --git a/index.js b/index.js index b83fa0a..42379f6 100644 --- a/index.js +++ b/index.js @@ -8,8 +8,6 @@ function 计算当前月一共有几天() { return daysInMonth; } -const days = 计算当前月一共有几天(); -console.log(`本月一共${days}天`); // 输出当前月份的天数 function getDayOfMonth() { const today = new Date(); @@ -20,6 +18,12 @@ function getDayOfMonth() { const diffDays = Math.ceil(diffMs / (1000 * 60 * 60 * 24)); return diffDays; } + +console.log(`当前月份:${new Date().getMonth() + 1}`) + +const days = 计算当前月一共有几天(); +console.log(`本月一共${days}天`); // 输出当前月份的天数 + const dayOfMonth = getDayOfMonth(); console.log(`今天是本月的第 ${dayOfMonth} 天`); diff --git a/package.json b/package.json index 72caa17..66bbecd 100644 --- a/package.json +++ b/package.json @@ -4,15 +4,15 @@ "description": "", "main": "index.js", "scripts": { - "dev": "node index.js", - "test": "echo \"Error: no test specified\" && exit 1" + "dev": "node index.js", + "http": "http-server -p 80" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { - "@types/node": "^18.0.6", - "node-fetch": "^3.2.6" + "@types/node": "^18.0.6", + "http-server": "^14.1.1", + "node-fetch": "^3.2.6" } - } - \ No newline at end of file +} -- GitLab