TimeSlotGenerator
Can generate a series of time slots based on certain settings such as slot duration and interval.
Methods
Inner Classes
Example
This example shows how you can use the class in your own code.
B25.TimeSlotGenerator.Context context = new B25.TimeSlotGenerator.Context();
context.startOfRange = System.now();
context.endOfRange = System.now().addDays(7);
context.duration = 60;
context.interval = 15;
// call the method and do something with the result
B25.TimeSlotGenerator.Result result = B25.TimeSlotGenerator.getTimeSlots(context);
for (B25.TimeSlot timeSlot : result.timeSlots) {
System.debug('time slot from ' + timeSlot.startDatetime
+ ' until ' + timeSlot.endDatetime);
}