| 1234567891011121314151617181920 |
- /**
- * 检查当前时间是否在7月28号零点之后
- * @returns {boolean} 如果在7月28号零点之后返回true,否则返回false
- */
- export function isAfterJuly28() {
- const now = new Date();
- const july28 = new Date(2025, 6, 28, 0, 0, 0); // 月份从0开始,所以7月是6
-
- return now >= july28;
- }
- /**
- * 检查当前时间是否在指定日期之后
- * @param {Date} targetDate 目标日期
- * @returns {boolean} 如果在目标日期之后返回true,否则返回false
- */
- export function isAfterDate(targetDate) {
- const now = new Date();
- return now >= targetDate;
- }
|