Calendar, Holiday and Working Day related functions, using supplied Holidays in Holiday Options

TypeScript
export interface

Methods

MethodDescription
getNextWorkingDay()Returns the next Working Day
getPreviousWorkingDay()Returns the previous Working Day
isHoliday(dateToCheck)Checks if given data is a Holiday
isSameDay(date1, date2)Returns true if both Dates are the same, ignoring the time portions
isWorkingDay(dateToCheck)Checks if given date is a Working Day

Method Details

getNextWorkingDay

Returns the next Working Day

TypeScript
getNextWorkingDay(): Date;
Returns

Date

getPreviousWorkingDay

Returns the previous Working Day

TypeScript
getPreviousWorkingDay(): Date;
Returns

Date

isHoliday

Checks if given data is a Holiday

TypeScript
isHoliday(dateToCheck: Date): boolean;
Parameters
ParameterTypeDescription
dateToCheckDateDate to Check
Returns

boolean

isSameDay

Returns true if both Dates are the same, ignoring the time portions

TypeScript
isSameDay(date1: Date, date2: Date): boolean;
Parameters
ParameterTypeDescription
date1Date1st Date
date2Date2nd Date
Returns

boolean

isWorkingDay

Checks if given date is a Working Day

TypeScript
isWorkingDay(dateToCheck: Date): boolean;
Parameters
ParameterTypeDescription
dateToCheckDateDate To Check
Returns

boolean