MCPcopy Create free account
hub / github.com/Xu22Web/tech-study-js / isNow

Function isNow

tech-study.js:2421–2427  ·  view source on GitHub ↗

* @description 时间已过 * @param hour * @param minute * @returns

({ hour, minute })

Source from the content-addressed store, hash-verified

2419 * @returns
2420 */
2421function isNow({ hour, minute }) {
2422 const date = new Date();
2423 const h = date.getHours();
2424 const min = date.getMinutes();
2425 const s = date.getSeconds();
2426 return h === hour && min === minute && s === 0;
2427}
2428/* 工具函数 */
2429/**
2430 * @description 设置cookie

Callers 1

refreshScheduleTaskFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected