@kermank/slots
Version:
A TypeScript library for handling time slots, scheduling, and timezone operations
18 lines (17 loc) • 909 B
TypeScript
import { SlotRule } from '../types';
/**
* Creates a rule that keeps only slots on specified weekdays
* @param weekdays - Array of weekday numbers to keep (1-7, where 1 is Monday and 7 is Sunday)
* If empty, all weekdays are kept
* @returns A rule that returns slots that should be removed (those not on specified weekdays)
*/
export declare const keepWeekdaysRule: (weekdays?: number[]) => SlotRule;
/**
* Creates a rule that removes slots on specified weekdays
* @param weekdays - Array of weekday numbers to remove (1-7, where 1 is Monday and 7 is Sunday)
* If empty, no weekdays are removed
* @returns A rule that returns slots that should be removed (those on specified weekdays)
*/
export declare const removeWeekdaysRule: (weekdays?: number[]) => SlotRule;
export declare const keepWeekdaysOnlyRule: (weekdays?: number[]) => SlotRule;
export declare const removeWeekendsRule: () => SlotRule;