UNPKG

ts-time-utils

Version:

A comprehensive TypeScript utility library for time, dates, durations, and calendar operations with full tree-shaking support

16 lines 973 B
/** * Working hours utilities for business time calculations */ import type { WorkingHoursConfig } from './types.js'; export declare const DEFAULT_WORKING_HOURS: WorkingHoursConfig; /** Check if a date is a configured working day */ export declare function isWorkingDay(date: Date, config?: WorkingHoursConfig): boolean; /** Check if inside working hours (excluding breaks) */ export declare function isWorkingTime(date: Date, config?: WorkingHoursConfig): boolean; /** Move date forward to next working minute */ export declare function nextWorkingTime(date: Date, config?: WorkingHoursConfig): Date; /** Compute working time (ms) between two dates */ export declare function workingTimeBetween(start: Date, end: Date, config?: WorkingHoursConfig): number; /** Advance by working hours amount (simple iterative approach) */ export declare function addWorkingHours(start: Date, hours: number, config?: WorkingHoursConfig): Date; //# sourceMappingURL=workingHours.d.ts.map