@asadi/angular-date-components
Version:
`Angular Date Components` is a comprehensive angular library of date-related components designed to meet the needs of applications that require localization based on various calendar systems. While the package currently includes two powerful components (S
23 lines (22 loc) • 1.07 kB
TypeScript
import { ADCIResourceSchedulerEvent } from "../interface.global";
/**
* `ResourceSchedulerEventTools` provides utility methods to work with resource scheduler events, such as
* filtering events between a given date range.
*/
export declare class ResourceSchedulerEventTools {
private readonly tools;
/**
* Filters and returns events that fall within the specified date range.
*
* The method checks each event's start and end dates against the provided range
* and returns events that overlap with the range, are contained within it,
* or completely span it.
*
* @param startDate The start date of the range in string format (e.g., 'YYYY-MM-DD').
* @param endDate The end date of the range in string format (e.g., 'YYYY-MM-DD').
* @param events The list of events to filter, or `null` if no events are provided.
*
* @returns An array of events that fall within the date range.
*/
getEventsBetweenDateRange(startDate: string, endDate: string, events: ADCIResourceSchedulerEvent[] | null): ADCIResourceSchedulerEvent[];
}