@bettergi/utils 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/time.js +1 -1
- package/package.json +1 -1
package/dist/time.js
CHANGED
|
@@ -19,7 +19,7 @@ export const getNextMonday4AM = () => {
|
|
|
19
19
|
result.setHours(4, 0, 0, 0);
|
|
20
20
|
// 如果当前为周一且时间在4点前,则返回今天4点,否则返回下一个周一的4点
|
|
21
21
|
const currentDay = now.getDay();
|
|
22
|
-
const daysUntilNextMonday = currentDay === 1 && now.getHours() < 4 ? 0 :
|
|
22
|
+
const daysUntilNextMonday = currentDay === 1 && now.getHours() < 4 ? 0 : 8 - currentDay;
|
|
23
23
|
result.setDate(now.getDate() + daysUntilNextMonday);
|
|
24
24
|
return result;
|
|
25
25
|
};
|