Check whether a date is within the current local clock hour.
Usage:
import { isThisHour } from "mazey";const ret = isThisHour(new Date());console.log(ret); Copy
import { isThisHour } from "mazey";const ret = isThisHour(new Date());console.log(ret);
Output:
true Copy
true
A Date, millisecond timestamp, or string accepted by isValidDate.
Date
isValidDate
Whether the value has the current local year, month, day, and hour. Invalid input returns false.
false
Minutes, seconds, and milliseconds are ignored. Results depend on the runtime's local timezone.
Check whether a date is within the current local clock hour.
Usage:
Output: