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

Function isSameWeek

pkgs/core/src/isSameWeek/index.ts:44–57  ·  view source on GitHub ↗
(
  laterDate: DateArg<Date> & {},
  earlierDate: DateArg<Date> & {},
  options?: IsSameWeekOptions,
)

Source from the content-addressed store, hash-verified

42 * //=> false
43 */
44export function isSameWeek(
45 laterDate: DateArg<Date> & {},
46 earlierDate: DateArg<Date> & {},
47 options?: IsSameWeekOptions,
48): boolean {
49 const [laterDate_, earlierDate_] = normalizeDates(
50 options?.in,
51 laterDate,
52 earlierDate,
53 );
54 return (
55 +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options)
56 );
57}

Callers 15

index.tsFile · 0.90
dayAndTimeWithAdjectiveFunction · 0.90
index.tsFile · 0.90
lastWeekFormatTokenFunction · 0.90
nextWeekFormatTokenFunction · 0.90
index.tsFile · 0.90
index.tsFile · 0.90
lastWeekFormatFunction · 0.90
nextWeekFormatFunction · 0.90
checkWeekFunction · 0.90
index.tsFile · 0.90
index.tsFile · 0.90

Calls 2

normalizeDatesFunction · 0.90
startOfWeekFunction · 0.90

Tested by

no test coverage detected