Skip to main content

system.kanoa.schedule.decodeScheduleBlock

This function requires KanoaOPS module

Description

Decodes the passed-in event record using the rangeStart, rangeEnd and rruleStr from the scheduleBlock.

Syntax

decodeScheduleBlock(scheduleBlock, rangeStart, rangeEnd)
  • Parameters
      scheduleBlock (dict)
      rangeStart (datetime)
      rangeEnd (datetime)
  • Returns
      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")
    eventTimes = system.kanoa.schedule.decodeScheduleBlock(scheduleBlock, startDate, endDate)