Skip to content

Commit

Permalink
fix:remove var
Browse files Browse the repository at this point in the history
  • Loading branch information
JedediahXu committed Mar 14, 2023
1 parent 80c59e4 commit 69333f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
26 changes: 11 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,21 @@
],
"icon": "time.png",
"galleryBanner": {
"color": "#EFF1F3",
"color": "#14181D",
"theme": "dark"
},
"main": "./dist/extension.js",
"contributes": {
"keybindings": [
{
"command": "extension.start",
"key": "ctrl+f1",
"mac": "cmd+f1",
"when": "inputFocus"
}
],
"commands": [
{
"command": "extension.start",
"title": "Reminder"
}
],
"keybindings": [{
"command": "extension.start",
"key": "ctrl+f1",
"mac": "cmd+f1",
"when": "inputFocus"
}],
"commands": [{
"command": "extension.start",
"title": "Reminder"
}],
"configuration": {
"type": "object",
"title": "ReminderSetting",
Expand Down
14 changes: 7 additions & 7 deletions src/Reminder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ export class Reminder {
</body>
<script>
function getTime() {
var date = new Date();
var year = date.getFullYear(); //获取年份
var month = date.getMonth() + 1; //获取月份
var day = date.getDate(); //获取日期
var hour = date.getHours(); //获取小时
let date = new Date();
let year = date.getFullYear(); //获取年份
let month = date.getMonth() + 1; //获取月份
let day = date.getDate(); //获取日期
let hour = date.getHours(); //获取小时
hour = hour < 10 ? '0' + hour : hour;
var minute = date.getMinutes(); // 获取分
let minute = date.getMinutes(); // 获取分
minute = minute < 10 ? '0' + minute : minute;
var seconds = date.getSeconds(); //获取秒
let seconds = date.getSeconds(); //获取秒
seconds = seconds < 10 ? '0' + seconds : seconds;
return month + '月' + day + '日&nbsp;' + hour + ':' + minute + ':' + seconds;
}
Expand Down

0 comments on commit 69333f7

Please sign in to comment.