system.kanoa.schedule.decodeScheduleBlock
Description
Decodes the passed-in event record using the rangeStart, rangeEnd and rruleStr from the scheduleBlock.Syntax
decodeScheduleBlock(scheduleBlock, rangeStart, rangeEnd, tzOffsets)- scheduleBlock (dict)
- rangeStart (datetime)
- rangeEnd (datetime)
- tzOffsets (dict)
- eventTimeList (list[datetime]
Code Example
# Example Usage:
scheduleBlock = system.kanoa.utilities.convertDatasetRowToJSON(system.kanoa.schedule.getScheduleBlocks({'scheduleBlockId': 938}),0)
startDate = system.date.parse("2025-01-01 00:00:00")
endDate = system.date.parse("2025-01-07 00:00:00")
tzOffsets = {'Pacific Standard Time': {startOffsetMins': -480, 'endOffSetMins': -480}}
eventTimes = system.kanoa.schedule.decodeScheduleBlock(scheduleBlock, startDate, endDate, tzOffsets)