MCPcopy
hub / github.com/date-fns/date-fns / isSameHour

Function isSameHour

pkgs/core/src/isSameHour/index.ts:34–45  ·  view source on GitHub ↗
(
  dateLeft: DateArg<Date> & {},
  dateRight: DateArg<Date> & {},
  options?: IsSameHourOptions | undefined,
)

Source from the content-addressed store, hash-verified

32 * //=> false
33 */
34export function isSameHour(
35 dateLeft: DateArg<Date> & {},
36 dateRight: DateArg<Date> & {},
37 options?: IsSameHourOptions | undefined,
38): boolean {
39 const [dateLeft_, dateRight_] = normalizeDates(
40 options?.in,
41 dateLeft,
42 dateRight,
43 );
44 return +startOfHour(dateLeft_) === +startOfHour(dateRight_);
45}

Callers 3

isThisHourFunction · 0.90
test.tsFile · 0.90
_testFunction · 0.90

Calls 2

normalizeDatesFunction · 0.90
startOfHourFunction · 0.90

Tested by

no test coverage detected