Constructors
constructor
- new ScheduleCalculator(schedule): ScheduleCalculator
-
Parameters
-
schedule: {
endsOn?: Date;
every: "minute";
interval: number;
maxOccurences?: number;
skipFirst?: number;
startsOn?: Date;
} | {
endsOn?: Date;
every: "day";
hour?: number;
interval: number;
maxOccurences?: number;
minute?: number;
skipFirst?: number;
startsOn?: Date;
} | {
dayOfWeek: number[];
endsOn?: Date;
every: "week";
hour?: number;
interval: number;
maxOccurences?: number;
minute?: number;
skipFirst?: number;
startsOn?: Date;
} | {
day: number | "last";
endsOn?: Date;
every: "month";
hour?: number;
interval: number;
maxOccurences?: number;
minute?: number;
skipFirst?: number;
startsOn?: Date;
} | {
day: number | "last";
endsOn?: Date;
every: "year";
hour?: number;
interval: number;
maxOccurences?: number;
minute?: number;
month: number;
skipFirst?: number;
startsOn?: Date;
}
Methods
hasNext
- hasNext(span?): boolean
-
Returns boolean
next
- next(): {
date: Date;
index: number;
}
-
Returns {
date: Date;
index: number;
}