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

Function isWeekend

pkgs/core/src/isWeekend/index.ts:27–33  ·  view source on GitHub ↗
(
  date: DateArg<Date> & {},
  options?: IsWeekendOptions | undefined,
)

Source from the content-addressed store, hash-verified

25 * //=> true
26 */
27export function isWeekend(
28 date: DateArg<Date> & {},
29 options?: IsWeekendOptions | undefined,
30): boolean {
31 const day = toDate(date, options?.in).getDay();
32 return day === 0 || day === 6;
33}

Callers 6

differenceInBusinessDaysFunction · 0.90
test.tsFile · 0.90
_testFunction · 0.90
test.tsFile · 0.90
addBusinessDaysFunction · 0.90
eachWeekendOfIntervalFunction · 0.90

Calls 1

toDateFunction · 0.90

Tested by

no test coverage detected