Skip to content

Commit 5c6d9d6

Browse files
committed
解答例修正
1 parent c6f59f4 commit 5c6d9d6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const countdownBox = document.getElementById("countdown-box");
22

33
const now = new Date();
4-
const remainingHours = 24 - now.getHours();
5-
const remainingMinutes = 60 - now.getMinutes();
4+
const remainingHours = 23 - now.getHours();
5+
const remainingMinutes = 59 - now.getMinutes();
66
const remainingSeconds = 60 - now.getSeconds();
7-
countdownBox.textContent = `今日は残り${remainingHours}時間 ${remainingMinutes}${remainingSeconds}秒です。`;
7+
countdownBox.textContent = `今日は残り${remainingHours}時間 ${remainingMinutes}${remainingSeconds}秒です。`;

docs/2-browser-apps/03-class/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ document.write(false.toString()); // false
396396
const countdownBox = document.getElementById("countdown-box");
397397

398398
const now = new Date();
399-
const remainingHours = 24 - now.getHours();
400-
const remainingMinutes = 60 - now.getMinutes();
399+
const remainingHours = 23 - now.getHours();
400+
const remainingMinutes = 59 - now.getMinutes();
401401
const remainingSeconds = 60 - now.getSeconds();
402402
countdownBox.textContent = `今日は残り${remainingHours}時間 ${remainingMinutes}${remainingSeconds}秒です。`;
403403
```

0 commit comments

Comments
 (0)