Function MomentToTimeSlot(Calendar, ReferenceDate, Elapsed)


The function MomentToTimeSlot determines the time slot in a calendar that corresponds with the a moment that is specified as the elapsed time since a specific reference date.

     Calendar,           ! (input) a calendar
     ReferenceDate,      ! (input) an element (time-slot) in the calendar
     Elapsed             ! (input) a numerical value



An identifier of type calendar.


A specific time-slot in Calendar holding the reference time.


The elapsed time since ReferenceDate. This should be an integral multiple of the calendar’s time unit in order to select the time slot that is the return value of this function.

Return Value

The function MomentToTimeSlot returns the time slot in the calendar that contains the given moment. When the time slot is outside the calendar the empty element is returned.