Skip to content

Commit 42e0b2f

Browse files
committed
time
1 parent 07b4a21 commit 42e0b2f

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

dist/easycoder-min.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/easycoder.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,13 +2801,15 @@ const EasyCoder_Core = {
28012801
content: Math.floor(Date.now())
28022802
};
28032803
case `time`:
2804+
let date = new Date();
2805+
date.setHours(0);
28042806
return {
28052807
type: `constant`,
28062808
numeric: true,
2807-
content: Math.floor(new Date().getTime() / 1000)
2809+
content: Math.floor(date.getTime() / 1000)
28082810
};
28092811
case `today`:
2810-
const date = new Date();
2812+
date = new Date();
28112813
date.setHours(0, 0, 0, 0);
28122814
return {
28132815
type: `constant`,

js/easycoder/Core.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,13 +2801,15 @@ const EasyCoder_Core = {
28012801
content: Math.floor(Date.now())
28022802
};
28032803
case `time`:
2804+
let date = new Date();
2805+
date.setHours(0);
28042806
return {
28052807
type: `constant`,
28062808
numeric: true,
2807-
content: Math.floor(new Date().getTime() / 1000)
2809+
content: Math.floor(date.getTime() / 1000)
28082810
};
28092811
case `today`:
2810-
const date = new Date();
2812+
date = new Date();
28112813
date.setHours(0, 0, 0, 0);
28122814
return {
28132815
type: `constant`,

0 commit comments

Comments
 (0)