Official Docs: GlideSchedule

The scoped GlideSchedule API provides methods for performing operations on GlideSchedule objects, such as adding new schedule segments to a schedule, determining if a datetime is within the schedule, or setting the schedule timezone


Adds a new schedule segment to the current schedule


Determines the elapsed time in the schedule between two date time values using the timezone of the schedule or, if that is not specified, the timezone of the session


Gets the current schedule name


Loads a schedule with the schedule information. If a timezone is not specified or is nil, the current session timezone is used for the schedule


Determines if the current schedule is valid. A schedule is valid if it has at least one schedule span


Sets the timezone for the current schedule