@adaptabletools/adaptable
Version:
Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements
45 lines (44 loc) • 1.25 kB
TypeScript
/**
* Calendar, Holiday and Working Day related functions, using supplied Holidays in Holiday Options
**/
export interface CalendarApi {
/**
* Returns the next Working Day
*/
getNextWorkingDay(): Date;
/**
* Returns the previous Working Day
*/
getPreviousWorkingDay(): Date;
/**
* Checks if given date is a Working Day
* @param dateToCheck Date To Check
*/
isWorkingDay(dateToCheck: Date): boolean;
/**
* Checks if given data is a Holiday
* @param dateToCheck Date to Check
*/
isHoliday(dateToCheck: Date): boolean;
/**
* Returns true if both Dates are the same, ignoring the time portions
* @param date1 1st Date
* @param date2 2nd Date
*/
isSameDay(date1: Date, date2: Date): boolean;
/**
* Returns true if the given date is today
* @param dateToCheck Date to Check
*/
isToday(dateToCheck: Date): boolean;
/**
* Returns true if the given date is yesterday
* @param dateToCheck Date to Check
*/
isYesterday(dateToCheck: Date): boolean;
/**
* Returns true if the given date is tomorrow
* @param dateToCheck Date to Check
*/
isTomorrow(dateToCheck: Date): boolean;
}