1 | import type { ContextOptions, DateArg } from "./types.js";
|
2 | /**
|
3 | * The {@link isWeekend} function options.
|
4 | */
|
5 | export interface IsWeekendOptions extends ContextOptions<Date> {}
|
6 | /**
|
7 | * @name isWeekend
|
8 | * @category Weekday Helpers
|
9 | * @summary Does the given date fall on a weekend?
|
10 | *
|
11 | * @description
|
12 | * Does the given date fall on a weekend? A weekend is either Saturday (`6`) or Sunday (`0`).
|
13 | *
|
14 | * @param date - The date to check
|
15 | * @param options - An object with options
|
16 | *
|
17 | * @returns The date falls on a weekend
|
18 | *
|
19 | * @example
|
20 | * // Does 5 October 2014 fall on a weekend?
|
21 | * const result = isWeekend(new Date(2014, 9, 5))
|
22 | * //=> true
|
23 | */
|
24 | export declare function isWeekend(
|
25 | date: DateArg<Date> & {},
|
26 | options?: IsWeekendOptions | undefined,
|
27 | ): boolean;
|